Is forbidding concurrent ssh sessions a good idea?

Is forbidding concurrent ssh sessions a good idea?

Tzafrir Cohen tzafrir at cohens.org.il
Mon Nov 12 12:30:26 IST 2012


On Mon, Nov 12, 2012 at 10:05:02AM +0200, Elazar Leibovich wrote:
> I'm considering to disallow concurrent ssh sessions on a single-purpose
> production machine (say, DB server).

Sessions != shells.

SSH can be used for various things (ssh, scp, whatever).

I normally keep at least one active shell session and occasionally use
minor ones for tab completion (of scp and such. Check out
/etc/bash_completion/ssh ). In order to avoid the overhead of several
SSH connections, I use a socket so that the various commands will use a
single TCP connection and SSH session (the one of my main shell session).

I also occasionally use ssh as, well a (secure) Remote SHell, and use it
to execute command on the remote machine.

> 
> I thought of replacing the default shell with a shell that keeps its pid
> file in a central place. If such a file already exist, it'll kill the other
> running shell before logging in.

This would have badly broken my personal use case.

-- 
Tzafrir Cohen         | tzafrir at jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir at cohens.org.il |                    |  best
tzafrir at debian.org    |                    | friend



More information about the Linux-il mailing list