[Linux VM access to console]

0

Hi,

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!
c.

Yoplin
已提问 4 年前234 查看次数
3 回答
0
已接受的回答

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.

Solution:

  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

已回答 4 年前
0

Thank you very much, Prince. That worked!

Yoplin
已回答 4 年前
0

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

已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则