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: , , , , , , , , , , , , , , , , , ,

OTRS login

By default, to login to a fresh OTRS install, the username is root@localhost and the password is root

Posted under Freeware, Linux

This post was written by Content Curator on December 4, 2007

Tags: , , , , , ,

MySQL login with command line (CLI)

# mysql -h hostname -u username -p

It will prompt you for the password.

Then:

> connect dbname

Posted under MySQL

This post was written by Content Curator on September 17, 2007

Tags: , , , , , , , ,

Easy Post Editing with WordPress

WordPress provides an easy method with which you can update your posts easily as you view them within your site. It is simply logging into your admin area, then viewing your site as a normal visitor. You can edit articles/posts/pages as you view them.

Heres how:
Login to your sites Admin area. This is usually something like http:///www.yoursite.com/wordpress/wp-admin.
Once logged in youll see a link at the top of the admin page that youre looking at (just following your website name) that says View Site >> . Click It.
Now youre viewing your website. Simply go view the page that you want to edit. Youll notice a link below the article that reads Edit or Edit this entry or something to that effect.
Just click thet Edit link, and youre in edit mode. Edit as usual.

Posted under WordPress

This post was written by Content Curator on October 11, 2006

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