0 votes
1 view
in AWS by (9.4k points)

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, when I want to copy a file to the instance using scp I am asked to enter a password:

scp somefile.txt -i mykey.pem [email protected]:/

Password:

Any ideas why this is happening/how it can be prevented?

1 Answer

0 votes
by (18.6k points)

This could be happening because of the wrong order of the arguments you used in the command to copy the file to your instance.

Try the following command:

scp -i mykey.pem somefile.txt [email protected]:/

Related questions

0 votes
1 answer
asked Jul 6, 2019 in AWS by Amyra (9.4k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...