服务器A认为它被称为foo.bar.com,但实际上有一个问题(不是在我的控制)与DNS注册,所以我连接到它在192.168.1.1。 我希望能够从那里scp使用公钥authentication服务器B. 我做了ssh-keygen,它创build了一个以“[email protected]”结尾的公钥(并将其安装在远端的authorized_keys中)。
问题:这个公钥不被接受,也许是由于反向查询的问题。 (我正在阅读这里的几行:
debug1: Trying private key: /home/rmmf/.ssh/identity debug3: no such identity: /home/rmmf/.ssh/identity debug1: Offering public key: /home/rmmf/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug3: Wrote 368 bytes for a total of 1477 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
…
工作的DNS条目是用于公钥authentication的先决条件吗? 我是否需要以不同的方式进行设置? 我怎么知道这究竟是不是问题?
回答你的问题,DNS入口不是先决条件。
你在/home/[your_user]/.ssh/authorized_keys文件中添加了私钥文件的内容吗?
这个文件就像您的公钥将被匹配的锁柜一样。
另外,将这个文件的权限设置为400(chmod 400 /home/[your_user]/.ssh/authorized_keys),并且确保它是你的用户拥有的(chown [your_user] /home/[your_user]/.ssh/authorized_keys)