终端 timed out waiting for input: auto-logout解决!

问题:

在ssh密钥连接情况下,一定时间不输入,则自动退出。

$timed out waiting for input: auto-logout超时等待输入:自动注销

一开始感觉和ssh检测机制有关系,

1、ssh超时

设置服务器向SSH客户端连接会话发送频率和时间.
#vi /etc/ssh/sshd_config,添加如下两行

# 启用客户端活动检查,每60秒检查一次,3次不活动断开连接

ClientAliveInterval 60
ClientAliveCountMax 3


# ClientAliveInterval指定了服务器端向客户端请求消息的时间间隔, 默认是0, 不发送。设置60表示每分钟发送一次, 然后客户端响应, 这样就保持长连接了。

# ClientAliveCountMax表示服务器发出请求后客户端没有响应的次数达到一定值, 就自动断开。正常情况下, 客户端不会不响应,使用默认值3即可。

重新启动SSH服务
#service sshd reload

####################################################################


然而,并没有什么变化,感觉和配置文件参数有关。想到环境变量。

1、$TMOUT 系统环境变量

# 用以下命令判断是否是否设置了该参数

echo $TMOUT

[[email protected]xxx ~]# echo $TMOUT

100

[[email protected] ~]#

# 如果输出空或0表示不超时,大于0的数字n表示n秒没有收入则超时。此时则是100秒。


# 修改方法

vi /etc/profile

(当然也可以在其它配置文件配置,涉及到环境变量配置文件读取优先级的问题)

# ----------------------------

export TMOUT=600

# ----------------------------

# 将以上600修改为0就是设置不超时

source /etc/profile

# 让配置立即生效 

问题解决!

####################################################################

问题总结:

1、问题并不难,只是由于配置了密钥认证,出现了此问题,一时没直接想到要害。

2、修改过程注意先文件进行备份再修改。

3、环境变量配置文件不要轻易修改,除非很熟练。

时间: 2024-08-01 14:13:29

终端 timed out waiting for input: auto-logout解决!的相关文章

timed out waiting for input: auto-logout

The ssh "timed out waiting for input: auto-logout" messages is generated by ssh upon reaching a auto-logout after an inactivity time specified by the TMOUT environment variable. If this variable is not set your session will not be auto-logged ou

timed out waiting for device to boot,unable to boot the iOS Simulator

平常工作中的关于XCode出现bug解决之后一定要做个记录,要不下次真的再遇到只记得遇到过,怎么解决的是真忘了. COM+R运行xcode之后,模拟器半天没反应,待会会出现这个下面图1这样的弹框,另外timed out waiting for device to boot这句话的一个弹框,不过问题解决了这个图2的弹框没有及时截图,只记得这句话. 出现这种问题大部分都是在升级XCode或者删除XCode再安装新的之后,会遇到的问题,我安装删除循环了N遍,问题还是没解决,网上找了半天也都没有解决,最

DHCP request error:Timed out waiting for dhcpcd to start【转】

本文转载自:http://blog.csdn.net/zvivi521/article/details/9166899 [init.svc.dhcpcd_eth0]: [stopped] I/ServiceManager( 2040): Waiting for service android.tvs.daemon...D/NetUtils( 1412): android_net_utils_runDhcpCommon, result:-1E/EthernetDataTracker( 1412):

MessagingTimeout: Timed out waiting for a reply to message ID

l3中出现大量消息超时错误,对网络的操作各种异常. 报错如下: 2016-02-25 05:54:59.886 15110 ERROR neutron.agent.l3.agent [req-db9207e6-9270-4f23-8c19-0d91d20cc6fb ] Failed synchronizing routers due to RPC error2016-02-25 05:54:59.886 15110 TRACE neutron.agent.l3.agent Traceback (

OpenStack报错:MessagingTimeout: Timed out waiting for a reply to message ID

L3.agent中出现大量消息超时错误,对网络的操作各种异常. 报错如下: 2018-09-24 05:54:59.886 15110 ERROR neutron.agent.l3.agent [req-db9207e6-9270-4f23-8c19-0d91d20cc6fb ] Failed synchronizing routers due to RPC error 2018-09-24 05:54:59.886 15110 TRACE neutron.agent.l3.agent Trac

javax.imageio.IIOException: Can't read input file!完美解决

今天遇到一个问题,上图 这段代码主要是给图片添加水印 后来百度发现可能是图片的路径出了问题,因为是动态获取的图片地址,然后我把地址打印出来了 之后通过终端查看,果然没有 之后我在classes目录找到了文件 这时焕然大悟 因为我的图片文件一开始是放在main文件夹的resources文件夹中的,在文件编译时,会被放在classes文件夹中.. 然而我的测试代码是运行在test文件夹的,test文件夹中的resources文件夹中的内容会被放在test-classes文件夹. 代码中动态获取路径时

WebView中input file的解决方法

public class MyWb extends Activity { /** Called when the activity is first created. */ WebView web; ProgressBar progressBar; private ValueCallback<Uri> mUploadMessage; private final static int FILECHOOSER_RESULTCODE = 1; @Override protected void onA

Xcode Coule not launch &quot;aaa&quot; press launch failed:timed out waiting for app launch

遇见这个问题 可能是 由于 runapp 的时候设置里面 设置为release了. 解决办法是:见图 build configuration 设置成 debug 状态就OK了. 要是上面的不行就试一下 stackoverflow上面的大神方案: 1.itounes 退出 2.手机 重启 然后 卸了app 3.Xcode 重启  clean 一下 4.重新运行 希望能够帮助 一些人.

(adhoc) process launch failed: timed out waiting for app to launch

I had a similar issue when trying to debug an App with Ad-Hoc provisioning... Check which provisioning you're using, it seems ad-hoc provisioning cannot be used for debugging. EDIT In fact, it seems only development provisioning profiles are Ok for d