Problem:
In the case of SSH key connection, a certain time does not enter, then automatically exits.
$timed out waiting for input:auto-logout timeout waiting for input: Automatic logoff
The first feeling is related to the SSH detection mechanism,
1. SSH timeout
Sets the frequency and time at which the server connects sessions to the SSH client.
#vi/etc/ssh/sshd_config, add the following two lines
# Enable client activity check, check once every 60 seconds, 3 inactive disconnects
Clientaliveinterval 60
Clientalivecountmax 3
# CLIENTALIVEINTERVAL Specifies the time interval for server-side request messages to clients, which is 0 by default and not sent. A setting of 60 means that it is sent once per minute, and then the client responds so that it remains long connected.
# Clientalivecountmax indicates that the client does not respond to a certain number of times after the server makes a request and disconnects automatically. Normally, the client does not respond, using the default value of 3.
Restart the SSH service
#service sshd Reload
####################################################################
However, there is no change in the sense and configuration file parameters. Think of environment variables.
1. $TMOUT System Environment variables
# Use the command to determine if the parameter is set
Echo $TMOUT
[[email protected]xxx ~]# echo $TMOUT
100
[Email protected] ~]#
# If the output is empty or 0 means no time-out, a number greater than 0 indicates that n seconds no revenue is timed out. This is 100 seconds.
# Modify Method
Vi/etc/profile
(Can of course also in other configuration file configuration, related to environment variable configuration file read priority problem)
# ----------------------------
Export tmout=600
# ----------------------------
# Change the above 600 to 0 is the setting does not time out
Source/etc/profile
# Let the configuration take effect immediately
Problem Solving!
####################################################################
Summary of issues:
1, the problem is not difficult, just because the configuration of key authentication, there is this problem, a moment did not directly think of the key.
2, the revision process note the first file for backup and then modify.
3, environment variable configuration file do not easily modify, unless very skilled.
This article is from the "[email protected]" blog, please be sure to keep this source http://renzhiyuan.blog.51cto.com/10433137/1872511
Terminal timed out waiting for input:auto-logout resolution!