diff --git a/easyssh.go b/easyssh.go index b3002d5..c28e5e4 100644 --- a/easyssh.go +++ b/easyssh.go @@ -41,7 +41,8 @@ func getKeyFile(keypath string) (ssh.Signer, error) { return nil, err } - file := usr.HomeDir + keypath + _ = usr + file := keypath buf, err := ioutil.ReadFile(file) if err != nil { return nil, err @@ -75,8 +76,9 @@ func (ssh_conf *MakeConfig) connect() (*ssh.Session, error) { } config := &ssh.ClientConfig{ - User: ssh_conf.User, - Auth: auths, + User: ssh_conf.User, + Auth: auths, + HostKeyCallback: ssh.InsecureIgnoreHostKey(), } client, err := ssh.Dial("tcp", ssh_conf.Server+":"+ssh_conf.Port, config)