权限被拒绝(公钥)

权限被拒绝(公钥)

我搜索了现有文档但一无所获。

我必须从我的笔记本电脑 ssh 到服务器 A,然后从那里我必须再次 ssh 才能访问服务器 B。

我尝试如下:

#ssh-add
#ssh -A username@serverA

然后

#ssh username@serverB --> Permission denied (publickey).

再次,从我的笔记本电脑,我将我的id.rsa(私钥)复制到服务器 A,然后从那里 ssh 到服务器 B,但什么也没有发生。

从服务器A到服务器B的ssh的简要输出:

debug1: ssh_ecdsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS
sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS
received debug1: Roaming not allowed by server debug1:
SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey debug1: Next
authentication method: publickey debug1: Offering RSA public key:
/home/moji/.ssh/id_rsa debug1: Authentications that can continue:
publickey debug1: Offering RSA public key: M.Taleghani debug1:
Authentications that can continue: publickey debug1: Trying private
key: /home/mojtaba/.ssh/id_rsa debug1: Trying private key:
/home/mojtaba/.ssh/id_dsa debug1: Trying private key:
/home/mojtaba/.ssh/id_ecdsa debug1: Trying private key:
/home/mojtaba/.ssh/id_ed25519 debug1: No more authentication methods
to try. Permission denied (publickey).

相关内容