Showing posts with label Putty. Show all posts
Showing posts with label Putty. Show all posts

Thursday, May 08, 2008

Putty passwordless ssh

putty accepts login and password as command line. So it can be easily used in batch to access machines without giving login and password.

putty host1 -l root -pw

I use it to the server which are build frequently. The problem with the server built frequently is that you cannot exchange keys as the keys will be deleted when the server is built again.

If you are using a linux box then sshpass can also be used for auto SSH.

Here is the batch script for windows lover

@echo off
if %1 == myserver goto myserver
goto default

:myserver
start C:\putty -ssh mercury -l -pw
exit

:default
start C:\putty -ssh %1 -l root -pw
exit

Friday, December 28, 2007

Putty Title

Putty Title can be easily modified using the function wt.

wt ()
{
echo -n "^[]2;${@}^G"
# In all of these, ^[ is really the "escape" character.
# You put it into a file using vi, by typing control-V and then hitting the Escape key.
# Likewise, ^G is the control-G# character. Again, hit control-V
# then hit control-G
}

The link 'http://www.unix.com/unix-dummies-questions-answers/35518-name-path.html'