Putty setup

Install and start Putty from here Links to an external site..

Convert your Private Key

Follow these instructions Links to an external site. to convert your private key to Putty format (.ppk) and save it somewhere.

Session Page

The session page is the main configuration page, and you can select it from the top of the category browser on the left of Putty.

In the Hostname field, specify the username@machine.address for your machine. The first time you login, the user will be ubuntu. Once you have your own account set up, you can use that. The machine address is dynamic, you'll have to get it from the Amazon EC2 console. Make sure the connection type is "ssh".

Putty_slide1.PNG

Add your SSH key

Go to Connection->SSH->Auth and put your file in the "Private key for authentication" field.

SSH Configuration

On the category tree on the left, find "Connection" and then "SSH" and finally select "X11".

At the top of the screen, click the checkbox for "X11 forwarding". This will forward X11 traffic between you and the host so you can use X11 clients on your laptop.

Putty_slide2.PNG

It you want to use ipython from your local browser, you need to create some additional tunnels. On the category tree on the left, under "SSH" select "Tunnels".

for several port numbers <portnum> in the range 8888-8900 do the following:

In the "Source port" box, type <portnum>.

In the "Destination port" box, type localhost:<portnum>

then click on add. Each time should produce a line that looks like

L8888        localhost:8888
L8889        localhost:8889
...               ...

We need these different ports because each instance of ipython (by you or others) that's started on the server will choose a different port number. The lines above create tunnels for each of these.

Putty_slide3.PNG

When you're done, go back to the "Session" page (top of the Category tree on the left). Type a name for this connection under "Saved Sessions" and finally click on "Save". This connection will be available now each time you start Putty.

Putty_slide4.PNG

Next time you start Putty, click on your saved connection, and the do "Load" to load it. Note that you;ll have to edit the "Hostname" field each time you start your instance from the EC2 console.

Click on "Open" to connect to your EC2 instance. Accept the ssh certificate if offered. If all is well, you'll get a Linux command prompt. Type

ipyhon notebook

to bring up an X11 browser on your machine. You should also be able to start a browser and point it at

http://localhost:<portnum>

where <portnum> is the number of the port that ipython started itself on (in its startup logs).

Additional Profile

Its a good idea to create an additional Profile that is configured like the one above but without the IPython tunnels. You can use that one to create other terminals to connect to your amazon instance that dont use ipython.