Tag Archives: scp

[Linux] solution: SCP different server copy file prompt permission denied, please try again

Problem Description: when using the SCP command to copy the file to another server, an error prompt appears

Permission denied, please try again.

terms of settlement

1. Check whether the SSH tool is installed, and change the corresponding configuration 1

Configuration file path: /etc/SSH/sshd_ config

Permitrootlogin no/without password
?Change to:
permitrootlogin yes

2. Check whether the permission to copy into the folder is sufficient

Check whether the folder has write permission, who is the user of the created folder and who the folder belongs to.

chmod 766 /usr/local/backup/

3. Check whether the SCP copy syntax is correct (whether the user name is correct/valid)

scp -r log [email protected] :/usr/local/backup

Please check the user name carefully