Connect to EC2 via Midnight Commander with key pair

I can connect or copy files to EC2 machine via:

ssh -i my.pem [email protected]

and

scp -i my.pem file.txt [email protected]:/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?


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.


Other way. Enter in console:

ssh-add /path/to/your/key/file_name.pem

After that you can enter your_name@your_address.amazonaws.com in mc shell-connect menu and press Ok