Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    Keep Your SSH Connection Open

    Do you get annoyed when you have a SSH session open, visit your browser for a while, and then return only to find you were disconnected? Most home NAT routers are the cause of this. If your router doesn't offer an option to not shut off idle connections, you are probably better off by setting a keep-alive setting.

    To do this, just open /etc/ssh/ssh_config on your home (client) computer. Add the following line:

    ServerAliveInterval 180

    There you have it! Just remember now, if you leave SSH open accidentally, anyone else can get on it. Remember to close your session when finished.