Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Add these lines to your ssh config file (sshd is the daemon for ssh) usually /etc/ssh/sshd_config. (not sure about fedora!)
ClientAliveInterval <time interval in seconds>
Restart sshd (try the command "service sshd reload" as root)
From the sshd_config manpage:
Sets a timeout interval in seconds after which if no data has
been received from the client, sshd will send a message through
the encrypted channel to request a response from the client. The
default is 0, indicating that these messages will not be sent to
the client. This option applies to protocol version 2 only.
Example (send "keep alive" messages every 5 minutes) on Red Hat Linux:
1. Add ClientAliveInterval 300 to /etc/ssh/sshd_config
2. Reload the sshd server configuration with /sbin/service sshd reload
Note: you may want to configure the ClientAliveCountMax value in sshd_config to set the number of times that "keep alive" messages are sent. If ClientAliveCountMax number of "keep alive" messages are not acknowledged by the ssh client, the connection is terminated by the ssh server. The default value of 3 should be sufficient for most users.
that looks like a screenshot of a "top" command, and not an IP traffic analyser.
Putting the timeout in a bashrc is extreme as it will disconnect at the client end rather than the server end. But if you are happy with this , fine , I personally would find out what the issue is and fix it correctly.
Closing down login shells just to disconnect from the ssh server is extreme in my view and may shut users down who are not even using ssh and they will wonder why? Not the sort of thing a good sysadmin would do, in my humble view.
and top / w , not too much difference , generally process/user related , I can't get excited about the difference suffice to say it IS NOT as I proposed you obtain, which was a list of IP traffic and sink/sources to establish what and who is sending, if at all, keepalives to the ssh server.
so, what do you think are affected by bashrc's tmout setting aside from your shell?
Why of course, any application that is invoked from or through the shell.
As stated above, in my humble view, killing the shell this way is not what a sysadmin would probably do. Its an overkill. Any user who is dropped into a bash shell will find themselves mysteriously logged out after "a period of inactivity".
If I were a sysadmin, I would wonder why anyone had took a sledgehammer to a nut in this way.