0

I am trying to transfer a file from windows to Linux using pscp.

This works perfectly fine:

pscp -i C:\ssh\access.ppk -v D:\test_1.txt user1@host1:/tmp/

However, this fails:

pscp -i C:\ssh\access.ppk -v D:\test_1.txt user1@host2:/tmp/

With below errors in verbose logs and prompting to enter password:

Offered public key
Server refused our key
Server refused our key

/home/user1/.ssh/authorized_keys on both host1 and host2 are completely identical in terms on contents, ownership, and permissions.

Both hosts contains different keys in /etc/ssh/ such as ssh-ed25519 and ssh-rsa but:

Host1 offers RSA key:

Doing ECDH key exchange with curve Curve25519, using hash SHA-256 (unaccelerated)
Host key fingerprint is:
ssh-rsa 3072 SHA256:456yyyyyyyyyyyyyyyyyyyyyy

Where Host2 offers ed25519 key:

Doing ECDH key exchange with curve Curve25519, using hash SHA-256 (unaccelerated)
Server also has ecdsa-sha2-nistp256/rsa-sha2-512/rsa-sha2-256/ssh-rsa host keys, but we don't know any of them
Host key fingerprint is:
ssh-ed25519 255 SHA256:123xxxxxxxxxxxxxxxxxxxxxxxxx

Doing a putty sessions manually also ends in similar situation. What else I could be missing, that makes this command work for host1 but not host2? I assume the keys being offered are the reason of the failure, but i am not sure why one host is offering RSA while other ED25519.

Maven
  • 14,587
  • 42
  • 113
  • 174

0 Answers0