Skip to content

Commit 6815ed2

Browse files
committed
perf: update ci build
1 parent 01e4c60 commit 6815ed2

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/actions/build-action/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
shell: bash
1717
- id: build-go-main
1818
run: |
19-
go build -o .
19+
CGO_ENABLED=0 go build -o .
2020
tar -czvf jmstool_${{ runner.os }}.tar.gz jmstool*
2121
echo "::set-output name=filename::$(echo jmstool_${{ runner.os }}.tar.gz)"
2222
ls -al

cmd/ssh.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"time"
2626

2727
"github.com/spf13/cobra"
28-
"golang.org/x/crypto/ssh"
2928
gossh "golang.org/x/crypto/ssh"
3029
"golang.org/x/term"
3130
"gopkg.in/yaml.v3"
@@ -107,7 +106,7 @@ jmstool ssh [email protected] -p 2222
107106
}
108107
var sshConfig SSHConfig
109108

110-
defaultConfig := ssh.Config{}
109+
defaultConfig := gossh.Config{}
111110
defaultConfig.SetDefaults()
112111

113112
if flagConfig, err := cmd.PersistentFlags().GetString("config"); err == nil && flagConfig != "" {
@@ -118,6 +117,7 @@ jmstool ssh [email protected] -p 2222
118117
if err := yaml.Unmarshal(raw, &sshConfig); err != nil {
119118
log.Fatal(err)
120119
}
120+
fmt.Printf("from config: %+v\n", sshConfig)
121121
if len(sshConfig.Ciphers) == 0 {
122122
sshConfig.Ciphers = defaultConfig.Ciphers
123123
}
@@ -130,7 +130,6 @@ jmstool ssh [email protected] -p 2222
130130
if len(sshConfig.MACs) == 0 {
131131
sshConfig.MACs = defaultConfig.MACs
132132
}
133-
134133
}
135134

136135
if password == "" && privateFile == "" {

ssh_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
MACs: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
2+
MACs: [hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96]
33

44
#Ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
55
#KexAlgos: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
66

7-
#HostKeyAlgos: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
7+
#HostKeyAlgos: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519

0 commit comments

Comments
 (0)