Linux Security essentials: Setting the System timeout

Source: Internet
Author: User
Tags security essentials

Main content: Set a connection timeout for the remote terminal (that is, how long the new instruction will be disconnected from the server and terminal)


[[email protected] ~]$ echo $TMOUT #--> view Tmout variables


[[email protected] ~]$ export tmout=10 #--> set tmout variable

[Email protected] ~]$ echo $TMOUT

10

[[Email protected] ~]$ wait for input timeout: auto Logout


Last Login:thu Jul 11:07:12 from 192.168.40.1

Welcome to Linuxgod ' s home

This is a lnmp ' testing server

#测试结果 #


With Echo Append side

[[email protected] ~]# echo "Exoprt tmout=300" >>/etc/profile #--> append the Set variable to the profile

[[email protected] ~]# tail/etc/profile #--> view/etc/profile last line

Exoprt tmout=300

[[email protected] etc]# source/etc/profile #--> Immediate effect


Edit with Vi,vim

[Email protected] ~]# Vi/etc/profile

#直接到最后一行里面添加 Export tmout=300 will do it.

[[email protected] etc]# source/etc/profile #--> Immediate effect



Linux Security essentials: Setting the System timeout

Related Article

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.