scp command appears Permission denied, please try again (publickey, password) prompt settlement

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.

Published 26 original articles · won praise 27 · views 6861

Guess you like

Origin blog.csdn.net/qq_40705355/article/details/102969711