[Linux VM access to console]



First of all, I'd like to say I'm a complete newbie so please be patient. This post might become a two-parter.

I'm trying to test a very simple setup which includes a Velocloud edge and I want to connect a Linux VM behind it to test VPN connectivity.

Initially, I added a new Ubuntu instance with default settings which booted properly and I could access it without a problem by using SSH. Since I wanted this Linux Instance to operate behind the VC Edge, I moved configuration stuff around (I'm still not sure I did it correctly) so that this VM would be in private IP space. The first problem I have is I have not been able to access the Ubuntu console at all.

For the SSH client or EC2 Instance connect, my understanding is you need to have valid public IP addressing. So, that only leaves the Session Manager, which throws the following error:

We weren’t able to connect to your instance. Common reasons for this include:

  1. SSM Agent isn't installed on the instance. You can install the agent on both Windows instances and Linux instances.
  2. The required IAM instance profile isn't attached to the instance. You can attach a profile using AWS Systems Manager Quick Setup.
  3. Session Manager setup is incomplete. For more information, see Session Manager Prerequisites.

My first question is: is there a way to get to a Linux console VM that only has private IP addressing on it?

My second question is: is there a simple tutorial for me to be able to set up and test simple IP networking between two instances?

Thank you very much!

asked 4 years ago263 views
3 Answers
Accepted Answer

Hi Yoplin,

I understand following is your setup:

  1. One EC2 instance is in private subnet on your AWS VPC.
  2. You want to SSH into this EC2 instance in private subnet.


  1. Create a new EC2 instance in the public subnet. Lets call this instance as "EC2Public". This will have a public ip address.
  2. SSH into this EC2Public instance using putty.
  3. FTP the private key (.pem file) of your EC2 instance in private subnet (lets call this instance as EC2Private) on the EC2Public instance.
  4. Now from within this EC2Public instance terminal, you can use the SSH command to login to
    EC2Private instance using the private ipaddress of EC2Instance private.
    Following command can be used :

ssh -i <key location of .pem file> <username>@<privateIpOfEC2Instance>
5. You will be able to get connected to EC2Instance private instance.
6. In case you are getting error related to file permissions, execute following command on the .pem file

chmod 0400 <.pem file>

Hope this helps!

Thanks & Regards,
Prince Arora

answered 4 years ago

Thank you very much, Prince. That worked!

answered 4 years ago

Great! You are welcome Yoplin. Happy to help. Good wishes !

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions