Fork me on GitHub

Mac ssh 连接报错 Permission denied (publickey)

用的阿里云服务器,如果直接连接,会报下面错误:

$ ssh root@47.94.132.115
Permission denied (publickey).

创建服务器的时候,连接秘钥会生成并下载到本地(xishuai-key.pem),解决方式:

$ chmod  600 /users/xishuai/.ssh/xishuai-key.pem
$ ssh -i /users/xishuai/.ssh/xishuai-key.pem root@47.94.132.115
posted @ 2017-08-23 11:56  田园里的蟋蟀  阅读(5652)  评论(2编辑  收藏  举报