I tried using the scp command with the -i option to transfer the file from local machine to remote EC2 instance:
Akhis-Macbook-Pro:~ aswinakhilesh$ sudo scp -i Mykey.pem FileA ec2-user@ec2-23-20-46-45.compute-1.amazonaws.com:/home/FileA
Instead of the file being copied, I am getting the following message:
Agent pid 2624
Akhis-Macbook-Pro:~ aswinakhilesh$ Identity added:
/home/.ssh/id_rsa (/home/id_rsa)
My .ssh folder in ec2 instance has the following files:
authorized_keys
id_rsa [Same as Mykey.pm, which is used with the -i option before]
known_hosts
It would be great if someone could help me out here!