Terminal timed out waiting for input:auto-logout resolution!

Source: Internet
Author: User


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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.