我们没有发送数据包,请禁用方法 [英] we did not send a packet, disable method
问题描述
我试图在AIX到AIX之间建立公共密钥连接,并且这种方法正在起作用,而在AIX和DataPower设备之间建立相同的公共密钥连接时,我遇到了问题.
I have tried to setup public key connection between AIX to AIX and that's working and I am facing problem while I setup same public key connection between AIX and DataPower appliance.
我可以在已建立连接的日志中看到,但是在使用public时,我无法登录,并且每次都希望手动输入密码.
I could see in logs that's connection established but while using public I am not able to login and everytime expecting to enter password manually.
有人可以帮忙吗?
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: ./***_rsa.pub
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
推荐答案
所以对我来说,发生了什么事,我有2个VM可以从本地计算机访问(2个键id_rsa.pub
和id_rsa2.pub
).我意识到我的ssh连接默认将id_rsa.pub用于任何ssh user@xx.xx.xx.xx
连接.我通过添加配置文件解决了我的问题,并指定了每个主机要使用的标识,如下所示:
So what happened for me is that I have 2 VMs to access from my local machine (2 keys id_rsa.pub
and id_rsa2.pub
). I realized that my ssh connection is using id_rsa.pub by default for any ssh user@xx.xx.xx.xx
connection. I solved my issue by adding a config file and specify the identity to be used for every host like the following :
vi ~/.ssh/config
Add both hostnames and their identity file as follows:
Host server1.nixcraft.com
IdentityFile ~/Users/.ssh/id_rsa1
Host server2.nixcraft.com
IdentityFile ~/Users/.ssh/id_rsa2
这篇关于我们没有发送数据包,请禁用方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!