Logging in via Putty

This article looks at using PuTTY from a Windows OS so you can securely connect to your Slice with minimal hassle.

It does involve the installation (onto Windows) of PuTTY but it is a quick and seamless affair.


Windows Versions

For the installation and screenshots shown below, I used Windows XP, Service Pack 2. Different versions of Windows, such as one of the dozen or so Vistas, may have slightly different screens.

Download and install

Firstly, we need to download PuTTY from their website.

Once done, click on the downloaded putty.exe:

Configure

The default port for SSH is 22 and is already set in the window. However, for this example I'm going to use the following configuration, as per the setup articles:

SSH port:      30000
username:     onion
IP address:    123.45.67.890

In the Host Name enter the IP address of your Slice and change the Port to 30000 (if you have not already configured your slice, leave this at the default of 22).

Ensure the Connection Type is set to SSH. You will also notice that I have saved this configurations as 'SSH VPS' - feel free to save it to whatever name you want: it simply saves time next time you use Putty. You can have a different name for each of your Slices:

You can also enable SSH compression under Connection -> SSH -> Enable compression.

Keyboard settings

One further setting is in the Terminal -> Keyboard settings: ensure the Backspace Key is set to Control-H:

Once you are ready, go back to 'Session' and click 'Load'. This will start the secure connection to your VPS.

Accept key

If this is the first time you have used Putty to SSH into your VPS, a warning similar to the one below will be shown:

Providing you are sure you have entered the correct details (IP address, etc) then click 'yes'. Subsequent connections will not show this warning.

Username and password

Once you have accepted the warning, the terminal will ask for your username and password:

Ben noted you can set your username under Connection -> Data -> Auto-login username

Simply enter the requested details and you will be securely logged into your VPS.

PickledOnion

Article Comments:

Ben commented Thu Sep 06 15:56:01 UTC 2007:

I recommend also setting the following options when using Putty...

  • @Connection > Data> Auto-login username@ (set to your remote SSH login)

  • @Connection > SSH > Enable compression@

PickledOnion commented Thu Sep 06 16:08:34 UTC 2007:

Ben,

Thank you for the suggestion. I'll add a note to make sure your comment is seen.

PickledOnion.

Chris commented Sat Nov 17 21:54:51 UTC 2007:

It's worth knowing that Putty is also available as a 'portable app' that can be run straight straight off a USB key without leaving your preferences in the registry of the machine your using. Very handy if your not able to get to your own machine.

abenamer commented Sun Dec 30 07:24:57 UTC 2007:

Some further notes:

Please go to:

http://www.andremolnar.com/howto_setupsshkeyswithputtyandnotgetserverrefusedour_key

if you want to learn how to make SSH keys in Slicehost that will work properly in Windows. Basically, pickledonion has the process backwards but god bless him for trying to accomodate us Wintel users. You have to gen the key on slicehost, copy it to your local box using WinSCP, convert them into keys that Putty understands, import them into Putty and pageant (putty's auth tool) and THEN you can get seamless auth into slicehost. It's almost worth getting a Mac I tell ya.

abenamer commented Sun Dec 30 07:27:47 UTC 2007:

Let me try that again...

Some further notes:

Please go here

if you want to learn how to make SSH keys in Slicehost that will work properly in Windows. Basically, pickledonion has the process backwards but god bless him for trying to accomodate us Wintel users. You have to gen the key on slicehost, copy it to your local box using WinSCP, convert them into keys that Putty understands, import them into Putty and pageant (putty's auth tool) and THEN you can get seamless auth into slicehost. It's almost worth getting a Mac I tell ya.

Anatoly commented Thu Jan 03 20:23:03 UTC 2008:

2abenamer: Public key could be generated on Windows machine. Just follow instructions in section 8.2.10 of PuTTY help file. The problem with saving file from PuTTY and than copying with SCP on slice server is that OpenSSH requires public key to be placed in one line, which is not so when key is saved by PuTTY. PuTTY authors recommend copying key from PuTTYGen GUI and pasting it to authorized_keys file opened in a text editor in opened session of SSH. That worked for me.

Hayden commented Sun May 04 21:52:12 UTC 2008:

PickledOnion: I'm finding the xterm emulation in Putty is a bit ropey. Typing (say) 'man ls' will cause the window title of the putty session to change, and the man text wraps oddly. It's putty that's broken here - CRT 3.1 works quite well.

Ryan commented Wed Sep 17 19:29:04 UTC 2008:

It is also worth noting that it is quite easy to access databases by using a tunnel and port forwarding. I will get the exact settings from home if I remember.

Andrew commented Mon Oct 13 00:37:53 UTC 2008:

Tutorial with screen shots about Putty and keys.

http://www.unixwiz.net/techtips/putty-openssh.html

Shoopuf commented Sat Nov 15 11:51:53 UTC 2008:

FYI, at the bottom of the "Keyboard settings" heading of this article it says to click 'Load' to start the connection, but the proper button seems to be 'Open,' not 'Load.'

P.S. Thanks for writing this article.

Frustrated commented Wed Dec 03 23:44:38 UTC 2008:

Thank you. I have been receiving the "connection unexpectedly closed by server" notice for several days now. I think it may be a key that was incorrectly declined or accepted on an earlier session. I have removed Putty and Winscp and reinstalled them, but I am still locked out. Any idea of where to look in the registry? A desktop search brings up no key file. (*.ptt I believe).

cherry commented Tue Dec 23 10:47:53 UTC 2008:

im also having that same issue as Frusted (great name:) - web server providers say its a local network issue, local network providers say its a server issue. nice!

Jonathan commented Sat May 09 00:46:45 UTC 2009:

Thanks for the great articles! Just out of curiosity, has the connection issue been resolved yet? I can barely keep a connection with putty open for more than 5-10 minutes, which is outrageous. I look forward to hearing any responses!

Thanks again for the awesome tutorials, they are truly some of the best I've come across.

Ken Y. commented Wed May 27 05:52:19 UTC 2009:

Another notable note (to go against the grammatical grain of the GUI, and alert you all with avid alliteration), in similar not to what Shoopuf mentioned, is that when you are saving settings to a specific SSH log-in profile with PuTTY, you must first select the profile and hit the 'Load' button. Once you select the settings you want to save, then you must hit 'Save' - in order to prevent saving your settings to the wrong profile, or not saving them at all.

That was, and still is, a major point of frustration, for the author himself =)

It kinds of makes you want to switch to Linux, and zero-fill every Windows drive you have....

Ken Y. commented Wed May 27 06:07:58 UTC 2009:

One more note, pertaining to auto-login with PuTTY...

Let's say you have two (or more) SSH session you use with PuTTY, and there is are two (or more) different logins from one session to the next.

You can set your 'Host Name (or IP address) on each to yourlogin@ip.

example:

If I have three SSH session I use regularly, at one or several different shells - who we'll call 'Bob', 'Jay' and 'Olaff'.

Your 'Hostname (or IP Adress)' field might look like this for each:

Bob@123.456.789 Jay@123.456/789 Olaff@211.112.112.101

The IP's and login names are just for example, of course. This works, for sure, without any 'secure key' - although, I don't know if it necessarily works with one. I figure that it should, but... I don't use any security key for SSH at the moment. I live on the edge ;)

Ken Y. commented Wed May 27 06:13:16 UTC 2009:

(Sorry that I didn't proofread the last comment - let me correct my typographical and grammatical errors, the best I can..)

One more note, pertaining to auto-login with PuTTY...

Let's say you have two (or more) SSH session you use with PuTTY, and there are two (or more) different logins from one

session to the next.

You can set your 'Host Name (or IP address)' on each to yourlogin@ip.

example:

If I have three SSH session I use regularly, at one or several different shells - who we'll call 'Bob', 'Jay' and 'Olaff'.

Your 'Hostname (or IP Adress)' field might look like this for each:

Bob@123.456.789 Jay@123.456.789 Olaff@211.112.112.101

The IP's and login names are just for example, of course. This works, for sure, without any 'secure key' - although, I don't

know if it necessarily works with one. I figure that it should, but... I don't use any security key for SSH at the moment. I

live on the edge ;)

bigrotor commented Mon Jun 22 20:31:15 UTC 2009:

using Vista, Anatoly's suggestion from above solved my problem

"PuTTY authors recommend copying key from PuTTYGen GUI and pasting it to authorized_keys file opened in a text editor in opened session of SSH. That worked for me."

When I saved the public key into a file, then copying/pasting from the file to the clipboard, it didn't work. Copying it directly from the puttygen.exe window, then pasting it onto the server with vi did the trick-- Thanks Anatoly

Matt commented Fri Sep 25 09:25:35 UTC 2009:

Thanks guys for your useful comments, really helpful to be able to see other people's opinions on Putty. Have taken note of all you said. Many thanks again... with this sort of help makes life a lot easier

petty commented Sat Nov 07 08:32:28 UTC 2009:

Los Angeles Lakers in the new season's first back to back journey through hard work, but to rely on Bryant's outstanding performance, they Quinella two extra-time,ugg boots three consecutive victories tomorrow will assume personal command of their home against the Memphis Grizzlies, ugg bootsthe Lakers have to fight for to get four game winning streak, while the Grizzlies have already suffered three straight away team returned to fight for a rebound.11.7C

mr ncoded commented Sun May 09 06:47:01 UTC 2010:

I have had a few issues with putty in the past so It was good to read an article about this.

Sun Mountain golf commented Sat Mar 16 00:29:36 UTC 2013:

I have to convey my respect for your kindness for all those that need guidance on this one field. Your particular commitment to passing the remedy up and down has been incredibly functional and has continually empowered most people just like me to attain their dreams. Your remarkable insightful info entails much to me and especially to my peers. Thanks a ton; from all of us.

sexkontakt commented Thu May 02 14:13:53 UTC 2013:

For det første har anus ingen naturlige glidemidler, og noen dråper spytt eller fittesaft er IKKE nok. Hvorfor skal man tvinge seg inn i normer som strider mot våre lyster og begjær. Til temaet er sex mulighetene mange og man kan utforske mye.

Maureen commented Tue Jun 25 01:34:36 UTC 2013:

Do you mind if I quote a few of your articles as long as I provide credit and sources back to your weblog? My blog site is in the very same niche as yours and my visitors would really benefit from some of the information you provide here. Please let me know if this ok with you. Regards!

best sex products commented Tue Jun 25 12:20:58 UTC 2013:

Heya i'm for the primary time here. I came across this board and I in finding It really helpful & it helped me out much. I hope to present something back and help others such as you helped me.

chula vista locksmith commented Tue Jul 16 11:35:59 UTC 2013:

I am really impressed along with your writing talents and also with the format for your weblog. Is this a paid subject or did you modify it yourself? Either way keep up the excellent quality writing, it's uncommon to peer a great blog like this one nowadays..

Want to comment?


(not made public)

(optional)

(use plain text or Markdown syntax)