-
Notifications
You must be signed in to change notification settings - Fork 389
Open
Description
hi, is there a way to implement jsch sftp interface such as UserInfo, UIKeyboardInteractive to login sftp server?
I try to login with the following code:
sshConfig := &ssh.ClientConfig{
User: sftpUser,
Auth: []ssh.AuthMethod{
ssh.Password(sftpPassword),
ssh.KeyboardInteractive(
func(name, instruction string, questions []string, echos []bool) ([]string, error) {
responses := make([]string, len(questions))
for i, q := range questions {
responses[i] = password
}
return responses, nil
}),
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
conn, err := ssh.Dial("tcp", addr, sshConfig)
but fail without setting up handshake and none prompt message, while jsch example login successfully with code like http://www.jcraft.com/jsch/examples/Sftp.java.html.
can you give me some example such as jsch or any advise to implement it?
Metadata
Metadata
Assignees
Labels
No labels