#116 AWS: ssh to a server with private IP only

Reading Time: 1 minute

I was playing with some servers in AWS. One of them had a public IP, but the second one had a private IP only. In order to access the 2nd server with private IP only, open up the key that was given to you for the 2nd server by AWS in PEM format in your favorite text editor. Select the text and copy it to the clipboard. The key looks like this. This key should belong to the 2nd server.

Now, log to the first server with the public IP as ec2-user.
Create a new file with nano or vi and paste the content. Save it as some_file.pem.
Change the permissions.

chmod 600 some_file.pem

Then log to the 2nd server with the private IP.

ssh -i some_file.pem <internal_IP>
#4 Prevent root login in SSH
#48 CentOS: install Roundcube web mail client
#142 CentOS: Apache Guacamole – Remote Desktop Gateway
There are currently no comments.