4
2
I am running an Ubuntu Virtual server at a remote location, and several people have SSH access to the server for reasons of web-dev and other various things. When I setup the server I set various parameters including 'TMOUT=1800', causing all SSH sessions to be terminated after 30 minutes of inactivity.
One of my web-developers is constantly asking me to turn off the timeout because he 'keeps getting logged out of the server' and does not like having to enter in his password every 30 minutes.
I enabled the timeout for security reasons, as to not allow SSH sessions to stay open for periods of time that are longer then needed, as it is an open connection to the server with root access.
The developer is arguing with me that it is perfectly okay to leave the connection open all the time, which I imagine is not a good thing.
Should I turn the SSH Timeout off (is it okay to leave open inactive SSH connections)? Or should I tell him to deal with it? Reasoning?
I know this is a couple of years old but the question remains relevant. My 2 cents: 1) a remote server is not the place to be doing active development; local development (in a VM if platform parity is a concern) -> push to source repo -> deploy and test remote is a better pattern. 2) PCI DSS standard recommends 15 minute timeout. Your dev should thank his lucky stars he gets 30m. 3) the timeout should be "activity" timeout -- if he's doing something in the terminal he shouldn't get forcefully disconnected – JDS – 2017-02-09T17:40:43.650
Why don't you tell your web-developer to set
ServerAliveInterval
on his machine instead? – terdon – 2013-01-23T22:51:24.3001Security is not a binary problem. There is no on = good, or off = bad. Security should always be related to the RISKS your system faces, with some considerations for the usability as well. The reason for setting a timeout would be if you are concerned that people might be able to take control of a computer with an active sessions. If you are pretty confident the clients are secure, then the time out is pointless/annoying. Is the data high value, is the system a potential stepping stone into some other extremely critical system? Only you know. – Zoredache – 2013-01-23T22:52:25.050
1For the record I have used SSH, as a VPN, with it left open for a few weeks between a couple systems because I couldn't get my normal VPN software to work through a particularly strict firewall, and the parties responsible for the firewall were not out for a while. The client/server where very secure, the connection was secure. Nothing abut the duration of the session made it insecure. – Zoredache – 2013-01-23T22:57:59.953
I appreciate the response. I guess until something happens, I have no reason to lock it all down. My concern was the possibility of some hijacking of an open session. – Matt Clark – 2013-01-23T22:59:44.163
The reason its not safe is because anyone could walk up to his computer and issue any command they want. The fact its perfectly safe to leave an SSH connection open is not the concern your trying to address by having a timeout. I don't understand his complaint to be honest since there are ways to keep a connection like this alive automatically. – Ramhound – 2013-01-24T01:02:29.410
@MattClark Somewhat off-topic, but it may be worth mentioning that if the server in question has tmux or screen installed (or the developer can install it in their home directory) they could easily save themselves the problem of lost work from session timeouts. This wouldn't solve the issue of having to type in their password, but it's better than nothing. (:
– Jeremy Sandell – 2013-01-24T16:40:16.417