I'm trying to copy files from one server to another with scp.
On both servers, I configured ssh port to 222. sshd_config for both servers is exactly the same (no RootLogin, PasswordAuthentication enabled)
For many reasons too long to explain here, I can't use key authentication.
When I use scp to copy from server A to server B (logged to A), it works. But it doesn't work when I'm doing the same thing from B to A (logged to B) : I get an error message "permission denied" and scp doesn't ask me for password (although the password authentication is enabled)
Here is the command I use (logged on server B) :
scp -P 222 -vvv ~/backup/file user@serverA:/home/user/backup
And here are the last lines of the output :
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: password
debug3: start over, passed a different list password
debug3: preferred publickey,keyboard-interactive
debug1: No more authentication methods to try.
user@serverA: Permission denied (password).
Why doesn't scp ask me for password, whereas "password" is enabled (as it is written in the 2nd "debug1" line) ?
Thank you.
user
is enabled? If I try this with PW and-vvv
I get this output:debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 51