Skip to content

Commit

Permalink
perf: update ci build
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Dec 27, 2024
1 parent 01e4c60 commit 6815ed2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
shell: bash
- id: build-go-main
run: |
go build -o .
CGO_ENABLED=0 go build -o .
tar -czvf jmstool_${{ runner.os }}.tar.gz jmstool*
echo "::set-output name=filename::$(echo jmstool_${{ runner.os }}.tar.gz)"
ls -al
Expand Down
5 changes: 2 additions & 3 deletions cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"time"

"github.com/spf13/cobra"
"golang.org/x/crypto/ssh"
gossh "golang.org/x/crypto/ssh"
"golang.org/x/term"
"gopkg.in/yaml.v3"
Expand Down Expand Up @@ -107,7 +106,7 @@ jmstool ssh [email protected] -p 2222
}
var sshConfig SSHConfig

defaultConfig := ssh.Config{}
defaultConfig := gossh.Config{}
defaultConfig.SetDefaults()

if flagConfig, err := cmd.PersistentFlags().GetString("config"); err == nil && flagConfig != "" {
Expand All @@ -118,6 +117,7 @@ jmstool ssh [email protected] -p 2222
if err := yaml.Unmarshal(raw, &sshConfig); err != nil {
log.Fatal(err)
}
fmt.Printf("from config: %+v\n", sshConfig)
if len(sshConfig.Ciphers) == 0 {
sshConfig.Ciphers = defaultConfig.Ciphers
}
Expand All @@ -130,7 +130,6 @@ jmstool ssh [email protected] -p 2222
if len(sshConfig.MACs) == 0 {
sshConfig.MACs = defaultConfig.MACs
}

}

if password == "" && privateFile == "" {
Expand Down
4 changes: 2 additions & 2 deletions ssh_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

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

#Ciphers: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
#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

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

0 comments on commit 6815ed2

Please sign in to comment.