I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem.
However, whe
Just tested:
Run the following command:
sudo shred -u /etc/ssh/*_key /etc/ssh/*_key.pub
Then:
To use PSCP, you need the private key you generated in Converting Your Private Key Using PuTTYgen. You also need the public DNS address of your Linux instance
pscp -i C:\path\my-key-pair.ppk C:\path\Sample_file.txt ec2-user@public_dns:/home/ec2-user/Sample_file.txt
I was hung up on this because I was specifying my public key file in
scp -i [private key file path]
When I caught that mistake and changed it to the private key path instead, I was all set.
I figured it out. I had the arguments in the wrong order. This works:
scp -i mykey.pem somefile.txt root@my.ec2.id.amazonaws.com:/
My hadoopec2cluster.pem
file was the only one in the directory on my local mac, couldn't scp it to aws using scp -i hadoopec2cluster.pem hadoopec2cluster.pem ubuntu@serverip:~
.
Copied hadoopec2cluster.pem to hadoopec2cluster_2.pem and then scp -i hadoopec2cluster.pem hadoopec2cluster_2.pem ubuntu@serverip:~
. Voila!
write this code
scp -r -o "ForwardAgent=yes" /Users/pengge/11.vim root@192.168.2.228:/root/
If you have a SSH key with access to the destination server and the source server does not, adding -o "ForwardAgent=yes" will allow you to forward your SSH agent to the source server so that it can use your SSH key to connect to the destination server.