I can connect to the server command line using Putty using the same private key.
But when I try to use the same key to transfer a file from my PC over to the server":
pscp -i C:\xxx.ppk "C:\xx\somefile.yy" ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com:/home/(some location)
I receive the following error:
Server refused our key Fatal: Disconnected: No supported authentication methods available (server sent: publickey)
Could someone help me with fixing this problem please?
You may want to review the Error: Server refused our key or No supported authentication methods available section of the Troubleshooting Connecting to Your Instance document.
Try this: add the -l user name option to the pscp command line, with the proper username for your instance.
pscp -i C:\xxx.ppk -l user ec2-user "C:\xx\somefile.yy" ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com:/home/(some location)
The -l option allows you to connect with specified username. You may have a username mismatch.
btw guys none of the examples above didn't work for me and here is what I use:
pscp -scp -i c:/ssh-key/ssh.ppk ./dist/* ubuntu@ec2-***.us-west-2.compute.amazonaws.com:/home/ubuntu/www
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With