Skip to content

Commit

Permalink
Update sealos/pkg/ssh/cmd/sshutil/connect.go
Browse files Browse the repository at this point in the history
蹭热度,减少无用函数定义
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
  • Loading branch information
Ubbo-Sathla committed Feb 26, 2021
1 parent 0310d35 commit 6b58606
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/sshcmd/sshutil/connect.go
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/wonderivan/logger"
"golang.org/x/crypto/ssh"
"io/ioutil"
"net"
"os"
"strings"
"time"
Expand All @@ -28,9 +27,7 @@ func (ss *SSH) connect(host string) (*ssh.Client, error) {
Auth: auth,
Timeout: *ss.Timeout,
Config: config,
HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
return nil
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}

addr := ss.addrReformat(host)
Expand Down

0 comments on commit 6b58606

Please sign in to comment.