LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-23-2007, 04:22 PM   #1
x_terminat_or_3
Member
 
Registered: Mar 2007
Location: Plymouth, UK
Distribution: Fedora Core, RHEL, Arch
Posts: 342

Rep: Reputation: 38
Keep-alive for SSH on wireless connection?


Hi there

I am experiencing some behaviour which I suspect is due to my wireless link.

I have the habit of leaving open several ssh sessions and switching back and forth to them as and when required.

At the office, which uses cable, this seems to work: connections stay alive as long as I want.

At home, however, the connections "freeze" when not being used for a set amount of time. Wait some more, and the shell exists with status code 255

For the record: ssh connections that are currently transfering data or receiving data (and outputting it on the console), keep alive for as long as that flow is going on + the set time, as mentioned before.


If I press a key inside the ssh session every minute, then the connection keeps alive too.

Anybody know how to remedy this?


Thanks
 
Old 04-23-2007, 04:39 PM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Probably a firewall that kills the non active connections to prevent DoS.

The ssh timeout has to be less than the firewall timeout.
 
Old 04-23-2007, 04:52 PM   #3
x_terminat_or_3
Member
 
Registered: Mar 2007
Location: Plymouth, UK
Distribution: Fedora Core, RHEL, Arch
Posts: 342

Original Poster
Rep: Reputation: 38
Please be aware that this does not happen on the connections made on the cable connection.

That said, what firewall are we talking about?
 
Old 04-23-2007, 07:03 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Our corporate firewall kills idle SSH connections after a period of time. Using putty, you can set it to send null packets periodically to keep your session active (I use 15 seconds here). Have a look at the Connection options in your putty client.

If your client is Linux, not Windows, I think the option to set is ServerAliveInterval. This can be set globally in /etc/ssh/ssh_config, or per user in ~/.ssh/config
 
Old 04-24-2007, 05:24 PM   #5
x_terminat_or_3
Member
 
Registered: Mar 2007
Location: Plymouth, UK
Distribution: Fedora Core, RHEL, Arch
Posts: 342

Original Poster
Rep: Reputation: 38
Thank you all for your input
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 06:15 AM
SSH hangs frequently over wireless connection smith_cc Linux - Wireless Networking 1 01-03-2007 06:37 PM
how to keep alive a pptp connection being timed-out by remote router? mfcarroll Linux - Networking 1 02-17-2005 08:03 AM
Keeping the connection alive? NonSumPisces Linux - Networking 2 07-08-2004 05:12 PM
imap+xinetd: connection not kept alive foogy Linux - Networking 3 07-08-2003 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration