Permission denied when using the scp command to copy files across hosts, please try again (publickey, password) error with error
root@hj-0219:~/.ssh# scp authorized_keys [email protected]:/home/
root@192.168.160.131's password:
Permission denied, please try again.
[email protected]'s password:
Permission denied, please try again.
root@192.168.160.131's password:
Permission denied (publickey,password).
lost connection
Solution, modify the / etc / ssh / sshd_config
# Authentication:
LoginGraceTime 120
PermitRootLogin yes #修改这一行为yes
StrictModes yes
Then restart the service:
systemctl restart ssh.service
You can be copied.