Connect to EC2 via Midnight Commander with key pair

amazon ec2command-line-interface

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?

Best Answer

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.