How To Make puTTY Automatically Load a Session

The most awesome emulator of all time, puTTY.exe, just got even easier to use. Along with loggiong automatically into a SSH session add the Windows shortcut that loads a saved session and launches it, now you have one click shell access to your Linux host from your Windows PC.

Here’s how:

  1. Download puTTY.exe
  2. Save it to the folder  C:\puTTY\
  3. Open a Windows Explorer window in C:\puTTY\
  4. Run puTTY.exe once, and create a “saved session”, making note of what you name it. My example below uses the name my neatly named Saved Session
  5. Right-click-drag puTTY.exe and drop it next to itself, this creates a shortcut to the .exe file.
  6. Right-click the shortcut you just created, on the popup menu click Properties.
  7. In the Target box, add -load “your-saved-session-name” after C:\putty\putty.exe
  8. The final content in the target box should look like:
    C:\putty\putty.exe -load "my neatly named Saved Session"
  9. Save the shortcut. Viola! Move or copy this shortcut anywhere you like (e.g. your Desktop, your QuickLaunch toolbar, your custom explorer toolbar, etc.) and you have 1-click access to a command prompt on your Linux / Unix host.

Enjoy!

Posted under Apple, Freeware, Linux, Microsoft, Network, Software, WebDev, ZyXel

This post was written by Content Curator on December 5, 2009

Tags: , , , , , , , , ,

Use puTTY to automatically login a SSH session

Many thanks to Jon Lee at jonlee.ca for this excellent procedure allowing for the automtic login of a session using SSH and puTTY.exe terminal emulator. You da man!

——————————-

From his site:

As many web developers can attest to, logging into your server through SSH (Secure Shell) is one of the more common day-to-day tasks (you can even use it as a secure tunnel for your traffic). It only makes sense to automate this process which in turn can save many many keystrokes.

This how-to is written with PuTTY and Windows in mind and requires several other tools that are available from PuTTY’s website. So from their download page, make sure you have these files:

  • PuTTY (putty.exe)
  • PuTTYgen (puttygen.exe)

Then to automate SSH login, do the following:

  1. Run PuTTYgen.
  2. Select SSH-2 DSA as the Type of Key to generate.
  3. Click generate and move your mouse around to generate randomness.
  4. Click “Save Private Key” and save it somewhere on your computer.
  5. Copy the entire content inside the box to your clipboard (this is your generated public key).
  6. Login to your SSH server.
  7. Create the file ~/.ssh/authorized_keys containing the generated public key (from step 3) on a single line.
  8. Make this file readable (chmod 755).
  9. Then open up PuTTY and navigate to Connection->Data and fill in the auto-login username.
  10. Navigate to Connection->SSH->Auth and under Private-key, browse to the file you had saved earlier on your computer.

That’s it! Now you can try logging in to your SSH server and it should login automatically. If it works, make sure you save your session so you don’t have to repeat these steps every time!

Hopefully these steps work for everyone! Let me know if there are any problems.

——————————-

Had some problems with a CentOS5 server not accepting keys… found that this server was being finicky for some reason, and used this article on how to generate the keys on the Linux server, and then import the public key to the client Windows box. To make it automatically login simply do not enter any passphrase. This is probably a huge security risk or something like that, but if you’re using it on a secured LAN then perhaps it’s ok.

Posted under Linux, Network

This post was written by Content Curator on November 27, 2009

Tags: , , , , , , , , , , , , , , , , , ,