[Cialug] SSH annoyance

David Champion dave at dchamp.net
Tue Mar 3 14:44:18 CST 2009


Daniel A. Ramaley wrote:
> On 2009-03-03 at 14:13:27, John Lengeling wrote:
>   
>> Just invoke ssh with:
>>
>> Ssh -X remote-host
>>     
>
> Once you know it works, you can make it permanent by adding
> "ForwardX11 yes" to your ~/.ssh/config file. If you want to limit it to 
> just 1 host, try something like this in ~/.ssh/config, replacing the 
> example remote host with something more interesting:
>
>     Host remotehost.example.com
>       ForwardX11 yes
>       Compression yes
>       ServerAliveInterval 300
>
> I add those last 2 lines for hosts that are on slow connections which 
> are prone to timeouts.
>   
Note: there is also a TCPKeepAlive option, but it's not recommended that 
you use that because it can allow your connection to be spoofed, instead 
use the ServerAliveInterval and ServerAliveCountMax settings as Dan 
suggests.

Here's an article that talks about those:

http://drupal.star.bnl.gov/STAR/comp/sofi/facility-access/ssh-stable-con

A lot of servers & firewalls are set up to drop idle connections, for 
"security reasons", but there are cases where you need to leave a ssh 
connection up, like doing a tunnel for instance, or because you don't 
like to re-authenticate every 2 minutes.

-dc




More information about the Cialug mailing list