Setting terminal timeout for remote conenctions.

Do you use remote administration through SSH?

  • Yeah it`s awesome.

  • No it`s useless...


Results are only viewable after voting.

Gwailo

B.A. Economics (Hon)
I want to set a timeout for SSH remote connections (not local if possible) in case I connect at work and forget to logout.

Where do I setup configuraitons for options like that?
 
e.g. for a 10 minute limit
sudo -s
perl -e 'print "\n\nClientAliveInterval 600\n"' >> /etc/sshd_config
exit

I've noticed a trend in the UNIX world to edit system software in the MOST INDIRECT way possible... I'm just curious why I can't ``sudo pico /etc/sshd_config`` and add the line at the end that way? Is this a more secure or proper way of doing it?

BTW Thanks a lot for the tip, it worked perfectly! I changed a few other things, like loginGraceTime (to 20 from 600) and permitRootLogin (to no from yes).

PS Does it matter (like it does in httpd.conf) in what order the directives appear?

Cheers!
 
Originally posted by Gwailo
I've noticed a trend in the UNIX world to edit system software in the MOST INDIRECT way possible... I'm just curious why I can't ``sudo pico /etc/sshd_config`` and add the line at the end that way? Is this a more secure or proper way of doing it?
You can definitely use pico (or vi, or emacs) to edit it; testuser just likes the perl method because it avoids the "use the editor of your choice, add this line, then save it" stuff...

PS Does it matter (like it does in httpd.conf) in what order the directives appear?

Cheers!

Nope, the ssh and sshd config files don't care about order, and don't have any grouping like Apache.
 
Back
Top