![如何修复 SSH 权限被拒绝的问题?](https://linux22.com/image/13823/%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%20SSH%20%E6%9D%83%E9%99%90%E8%A2%AB%E6%8B%92%E7%BB%9D%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%9F.png)
我按照所有步骤操作并创建了该/home/dave/.ssh
文件夹。然后我跑了:
ssh-keygen -t rsa –P ""
并得到:too many arguments
。我试过:
ssh-keygen -t rsa –P
然后它跳回提示符。
然后我尝试:
$ cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
cat: /home/dave/.ssh/id_rsa.pub: No such file or directory
我究竟做错了什么?
答案1
将破折号替换–
为-
:
ssh-keygen -t rsa -P ""