Search This Blog

Showing posts with label putty. Show all posts
Showing posts with label putty. Show all posts

Wednesday, May 8, 2013

Putty shortcut and tricks

I'm switching between many systems and lastly work quite a lot with putty. My ssh session sometimes timeouts and putty 'hangs'. I can always reconnect by using mouse:
  • navigate to upper left cornet and press the putty icone
  • from the menu select Restart session
Problem

What keyboard short can be used to restart putty session.

Solution

In the default settings for putty enable the keyboard shortcut for ALT + Space.
Now if you want  to reconnect your session you can press:

Shortcut : ALT+Space followed by 'r'


References
  1. http://www.thegeekstuff.com/2009/07/10-practical-putty-tips-and-tricks-you-probably-didnt-know/
  2. http://stackoverflow.com/questions/265374/putty-shortcuts-to-minimize-maximize-restore-and-move-the-window

Friday, December 30, 2011

How to connect over ssh to a server and automatically provide the user name and password using putty or ssh

With the benefit of easy of use of cloud services we can provision a new cloud base virtual server within a minute. Having the server ready we still have to login there to do our job or tests.

As an example you can take a look at the Cloud Servers from Rackspace [1].

By using the free windows ssh implementation like putty [2] or standard linux openssh ssh client we can easily login over a secure connection into our server by using the SSH protocol.

Problem
When you want to quickly and temporarily provision a cloud server it is time wasting when you have to provide the user name and password each time to login to do the work.
As the cloud server will be used for a limited (short) time we would like to be able to login with one 'click' or one command only.

Solution
The Multi-Tabbed PuTTY tool allow us to use a wrapper around the putty tool and provide an easy to use solution to open a new ssh session on demand without having to wory about he user name or password.

Multi-Tabbed PuTTY
http://www.ttyplus.com/

For the Linux system we can use an simple script using the 'expect' tool to start the ssh client.

SSH - Passing Unix login passwords through shell scripts
http://nixcraft.com/shell-scripting/4489-ssh-passing-unix-login-passwords-through-shell-scripts.html

Security
From the security point of view storing the passwords is always a bad idea. There are always some alternative methods. Some examples listed below:

Password-less logins with OpenSSH
http://www.debian-administration.org/articles/152
http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/

References
[1]
http://www.rackspace.com/cloud/cloud_hosting_products/servers/

[2]
http://www.chiark.greenend.org.uk/~sgtatham/putty/