Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping a SSH client's connection alive

Status
Not open for further replies.

aballant

Programmer
Jan 31, 2002
46
US
Hi,

I understand that there is a config setting for SSH, which can 'KeepAlive' a connection, that is will send dummy messages periodically to stop a firewall closing the TCP connection. But this only works if the Server has the same setting.

Does any one know a simple method to keep the connection "active"

cheers,
Andrew
 
You could try a fudge like this

[tt]while sleep 300 ; do echo ".\b\c" ; done &[/tt]

Which would echo a character to your terminal and then backspace it every five minutes. There's probably a neater solution though...

Annihilannic.
 
Thanks, this works beautifully.

cheers,
Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top