linux - go如何处理keyboard interactive类型的ssh登录
ringa_lee
ringa_lee 2017-04-17 14:57:19
0
1
593

1、需要使用go做个window平台上通过ssh协议访问linux的工具,但是由于安全要求,linux上的sshd_config做了如下限制:

PasswordAuthentication no

2、现在找到的例子主要是采用上面Password认证方式的,如:golang/crypto/ssh的ssh.ClientConfig当前的认证方式配置为

client, err := ssh.Dial("tcp", "x.x.x.x:22", &ssh.ClientConfig{
    User: "root",
    Auth: []ssh.AuthMethod{ssh.Password("xxxxxx")},
})

3、希望大侠们能够提供一个keyboard interactive方式的代码段供小弟参考一下,多谢多谢。

ringa_lee
ringa_lee

ringa_lee

répondre à tous(1)
Ty80

请参考:http://www.nljb.net/default/Go-SSH/

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!