使用ssh远程连接服务器Permission denied (publickey). 解决方法

  • Post author:
  • Post category:其他


首先登陆到远程主机并配置文件

sudo vim /etc/ssh/sshd_config

找到PasswordAuthentication

将PasswordAuthentication no改为yes,保存

接着使用命令:

sudo service ssh restart

即可连接远程服务器或内网电脑

sudo ssh unix@xx.xxx.xx.x 输入yes,输入密码,连接成功。