ssh

scp出现Permission denied (publickey). lost connection


原因:scp是基于ssh的拷贝服务,ssh在没有密钥登录的情况下,禁用了密码登录。想要解决只需要修改配置文件。

方法:
登录远程主机,将/etc/ssh/sshd_config文件中的PasswordAuthentication no 改为PasswordAuthentication yes

重启sshd服务:systemctl restart sshd

原文地址:https://www.cnblogs.com/ajaxa/p/10929130.html