Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can connect or copy files to EC2 machine via:

ssh -i my.pem ec2-user@ec2.xxx.compute.amazonaws.com

and

scp -i my.pem file.txt ec2-user@ec2.xxx.compute.amazonaws.com:/home/ec2-user

but I want to manage remote files via Midnight Commander. There are "shell links" but how can I use it with key pair connection?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

There are "shell links" but how can I use it with key pair connection?

Put the following into ~/.ssh/config:

Host ec2.xxx.compute.amazonaws.com
    User ec2-user
    IdentityFile /path/to/the/my.pem

then try again.

share|improve this answer
    
Excellent! And I can use host alias in Host attribute and real host name in HostName attribute. Nice. Thanks quanta. –  mschayna Sep 18 '12 at 11:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.