Wednesday, December 24, 2008

The best putty package available

Bored of Black screened Task bar filling putty? Issues with porting Saved sessions from machine to machine? Do you like tabbed SSH sessions?

Start using portaputty instead of normal putty and link it with puttycm.

Puttycm supports sessions to be saved in its own Database files. You can use the Putty sessions you have saved already right inside putty.
You can have any number of databases which allow you to arrange Remote servers in folders and convenient namings.

I personally recommend creating Database with puttycm rather than using the sessions saved in putty which doesn't offer any option to create folders and saving sessions under that directory tree.
You can even save username/password to get it logged automatically and there is an option to pass commands to be run soon after login. I can't recommend this since some bug was found with these options.

Portaputty is a variant of putty which stores all the Configuration data in text files instead of MS Windows Registry entries thereby making customization and portability much easier than ever. For example you can set the default colour behaviour to set "Use system colours" just by editing the entry UseSystemColours=1 in .putty\sessions under the directory from where you are running portaputty.

puttycm is the Putty Connection Manager that gives a user interface where we can open multiple putty sessions in tabs and store sessions in a hierarchical directory tree structure. The saved sessions are being stored in DB files and the same can be exported to XML and can be transferred.
Both puttycm and portaputty are standalone executable. No more setup is required. Only thing is mention the full path to putty(here portaputty in our case) at first run of puttycm. Download portaputty here and puttycm can be downloaded from here

A typical Putty screen will appear as below with these PuttyCM and PortaPutty

Wednesday, December 10, 2008

screen for Remote assistance and chat

screen is a UNIX utility for giving remote assistance/administration. Suppose an unskilled colleague of your own is struggling with a server at some remote location with no idea of troubleshooting a problem.
If you are able to solve that with keeping your colleague to watch how you are sorting out the issues you can use screen.

First of all ask your colleague for the username which he used to login into that remote machine. Now you can login to that remote machine as the same user. Imagine username is engineer and IP of the remote machine is 192.168.1.1. Try the below
# ssh engineer@192.168.1.1
Then after getting logged in run the screen command to set a session named myscreen
$ screen -S myscreen
Now tell your colleague to type the below for attaching his screen to your screen.
$ screen -x myscreen
Thats it. Now he can watch whatever you type and vice versa.

Monday, December 8, 2008

Run X11 programs after SSH and switch to another user

This issue arises when you are logging in as root and trying to launch some X11 programs after doing a switch to user oracle.
One solution is to login directly as the user as which you want to run thos X11 programs.
One more workaround is there.Here you can login as a different user. Thereafter run the below command
xauth list | grep "`hostname`/"| grep `echo $DISPLAY | cut -f2 -d: | cut -f1 -d.`

Copy the output. Then switch to second user and run xauth add as this output as an argument as below
xauth add training/unix:13 MIT-MAGIC-COOKIE-1 57f03bee06be924299b0bedde6499bd1

Now run any X11 programs.