我正在尝试使用ssh登录远程服务器,而不使用密码,但我得到了错误:
Permission denied (publickey)要将.pub密钥复制到服务器,我有:
PasswordAuthentication = yes (in the sshd_config file).复制.pub密钥后,我在我拥有的ssh_config中禁用了密码:
PasswordAuthentication = no现在当我试着说:
ssh‘server@192.168.x.x’
我发现了一个错误:
Permission denied (publickey)我怎样才能解决这个问题?
我已经更改了authorized_keys权限、. .ssh/权限等等,但问题仍然存在。我甚至使用了ssh代理$SHELL && ssh命令。
发布于 2018-09-19 13:50:52
我总是使用下面的步骤创建到远程计算机的新ssh连接:
ssh密钥对(只需按enter直到返回到shell):localhost$ ssh-keygen -t rsa localhost$ cp .ssh/id_rsa.pub .ssh/authorized_ key注意:我从不编辑
ssh_config和sshd_config,除非它们已经连接,否则您也许可以将它们恢复到原来的状态。
https://unix.stackexchange.com/questions/469948
复制相似问题