-   Linux - Networking (
-   -   putty or ssh auto launcher (

nand 05-29-2012 12:15 PM

putty or ssh auto launcher

I have a some linux routers from which I want to collect logs for as long as I'm at work. (usually done with putty, ssh to ip and tail /var/log/messages. Putty is set to save output to file)
The problem is that they get rebooted o'lot and manually starting logs is error prone (people forget to restart the putty connection).

Do you know of any software or script that could be set up to launch putty whenever an ip is up? (ie: start putty automatically when the linux box replies to ping)

The workstations are windows, so putty is preferred, but I think installing cygwin to use ssh should not be a big problem.

Thank you,

Kustom42 05-29-2012 12:35 PM

Why not just create a watchdog service that runs on startup and logs your data, then you can hop in whenever you need to check them.

teckk 05-29-2012 12:57 PM

I found these if they help

ssh -MNf <user>@<host>
Create a persistent connection to a machine


autossh -M50000 -t 'screen -raAd mysession'
Open a ssh session opened forever, great on laptops losing Internet connectivity when switching WIFI spots.


ssh -t remotebox "tail -f /var/log/remote.log"
tail a log over ssh

All times are GMT -5. The time now is 05:08 PM.