Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH to EC2 linux instance from Windows

I'm setting up a "data analysis on the cloud" class and most of the students will probably be using Windows.

The students will have to set up EC2 Ubuntu instances and connect to them.

What is the easiest way to set up SSH for Windows XP-7?

I've tried PuTTY but Puttygen can only convert the public key to putty format if I manually add newlines in a text editor. This is too involved for the class of 80.

I've tried OpenSSH but I can't seem to find the correct permissions for the public key file. On Mac OS/Linux it's just chmod 600.

Is there a decent SSH client that supports Amazon's key format that I can set up easily?

like image 956
Austin Richardson Avatar asked Mar 10 '11 19:03

Austin Richardson


People also ask

Can you RDP into a Linux EC2?

Connecting via RDP On a Linux machine, connect using vinagre . You'll need to specify the IP address for the EC2 host and the RDP port.

How do I SSH into my EC2 instance without public IP?

If the instance does not have a public IP address, you can connect to the instance over a private network using an SSH client or the EC2 Instance Connect CLI. For example, you can connect from within the same VPC or through a VPN connection, transit gateway, or Amazon Direct Connect.


3 Answers

If anybody's looking for windows 10 solution.
In Windows 10, you can use powershell. Use above command.

ssh -i \..\location-to-pem-file.pem [email protected]

If ssh is not supported in your windows 10 machine, follow this url for installation.
I used it and suggested the same.

like image 88
HV Sharma Avatar answered Sep 20 '22 02:09

HV Sharma


Step1: Download the keypair

Step 1:

The download will create a .pem file on your local system. It contains a private key that you can use to connect to the EC2 instance via SSH

Step 2: Launch your linux instance

enter image description here

Copy the public ip address for the future use to connect the linux instance

Step 3: Download puttyGen from https://the.earth.li/~sgtatham/putty/latest/w32/puttygen.exe

Step 4: Execute the PuttyGen exe and load the private key(the pem file you have downloaded while launching the instance)

enter image description here

Step 5: Save the private key, it will give the .ppk file which will be used to connect the linux instance

enter image description here

Step 6: Download and install the Putty software, open the putty, and paste the public ip address which you copied from the linux instance

enter image description here

Step 7: Now load the .PPK file which we have saved

enter image description here

Step 8: Choose yes from the alert window enter image description here

Step 9: Login as ec-user enter image description here

like image 37
Rex Andrew Avatar answered Sep 20 '22 02:09

Rex Andrew


The .pem file Amazon Web Services gives you is supported by the openssh client implementations, but for a Windows-based client that works directly with the .pem file without converting it with puttygen.exe, look into Bitvise Tunnelier.

like image 25
逆さま Avatar answered Sep 20 '22 02:09

逆さま