通过远程计算机使用 SSH 进行永久授权
我有一个使用 ssh 连接的远程计算机,如下所示:
ssh -i /path/to/private_key [email protected] -L 5901:localhost:5901
每次连接时我都会收到:
Enter passphrase for key '/path/to/private_key':
我想知道如何防止每次输入密码?即是否可以永久向远程计算机解释我是授权用户并且它可以信任我?
PS 当我在远程计算机上发出 cat ~/.ssh/authorized_keys
时,我可以看到我的公钥内容。但看起来远程机器总是忽略它或类似的东西......
I have remote machine which I connect with ssh like this:
ssh -i /path/to/private_key [email protected] -L 5901:localhost:5901
Each time I connect I receive:
Enter passphrase for key '/path/to/private_key':
I wonder how to prevent entering password each time? I.e. is that possible to permanently explain to remote machine that I am authorized user and it can trust me?
P.S. When I issue cat ~/.ssh/authorized_keys
on the remote machine I can see my public key content. But it looks like remote machine always ignore it or something like that...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 SSH 密钥受密码保护。服务器不会提示您输入密码,您的本地计算机会要求您提供密码以使用您提供的 SSH 密钥。
可以在此处找到删除密码阶段的信息:如何删除 SSH 密钥的密码而无需创建新密钥?
编辑:上述问题的最佳答案是:https://stackoverflow.com/a/112409/965648
Your SSH key is passphrase protected. The server isn't prompting you for a password, your local machine is asking for the passphrase to use the SSH key you provided.
Information to remove the passphase can be found here: How do I remove the passphrase for the SSH key without having to create a new key?
Edit: The best answer for the above question is: https://stackoverflow.com/a/112409/965648