LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   putty or ssh auto launcher (http://www.linuxquestions.org/questions/linux-networking-3/putty-or-ssh-auto-launcher-947424/)

nand 05-29-2012 01:15 PM

putty or ssh auto launcher
 
Hello,

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

Kustom42 05-29-2012 01: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 01:57 PM

http://www.commandlinefu.com/command.../sort-by-votes

I found these if they help
Code:

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

Code:

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

Code:

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

http://superuser.com/questions/18729...t-interruption
http://jlarky-blog.blogspot.com/2011...reconnect.html
http://nemesis2.qx.net/pages/MyEnTunnel


All times are GMT -5. The time now is 07:55 AM.