Access to ec2 host vm post-launch using id_rsa

I am trying to access an ec2 instance launched as host through the rancher ui.

This post highlights the problem I’m running into:

The explanation makes sense. However, I’m still not able to connect. I’ve tried multiple keys and the id_rsa approach.

When using the id_rsa approach, is it still required that chmod 600 be used as well as listing the full path to the id_rsa?

http://docs.rancher.com/rancher/rancher-ui/infrastructure/hosts/#accessing-hosts-from-the-cloud-providers

You need to download the machine config which has the specific id_rsa for the machine that you want to access.

Wherever you launch the command should have access to the id_rsa. I haven’t tested in awhile, but I don’t ever remember doing a chmod for it.

What EC2 OS did you select? Sometimes you need to use different users based on your OS. For example, RancherOS would be ssh -i id_rsa rancher@<ip_of_host>, Ubuntu is ssh -i id_rsa ubuntu@<ip_of_host>.

You need the right username too… If you didn’t specifically set an AMI then it will be an Ubuntu image and either root or ubuntu (Not rancher).

I am using ubuntu OS, and i downloaded the config.

I tried the following:

$ ssh -i id_rsa ubuntu@ec2-54-152-228-146.compute-1.amazonaws.com

$ ssh -i id_rsa ubuntu@54.152.228.146

$ ssh -i ~/full-file-path/id_rsa ubuntu@54.152.228.146

none of these provided access to the instance.

I just tested this with v1.0.0 and had no issues.

Do you have more than 1 host? Please make sure you are in the correct host’s folder. If you have navigate inside the folder of the host, then you should be able to do ssh -i id_rsa ubuntu@54.152.228.146 and log into the machine.