본문 바로가기

Learning/└◆리눅스 서버 보안

01_TMOUT 변수 설정

<!--[if !supportEmptyParas]--> <!--[endif]-->

TMOUT 변수 설정

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

사용시스템

- KaliLinux

- linux200

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

(linux200)

<!--[if !supportEmptyParas]--> <!--[endif]-->

# man bash

/TMOUT

TMOUT If set to a value greater than zero, TMOUT is treated as the

default timeout for the read builtin. The select command

terminates if input does not arrive after TMOUT seconds when

input is coming from a terminal. In an interactive shell,

the value is interpreted as the number of seconds to wait

for input after issuing the primary prompt. Bash terminates

after waiting for that number of seconds if input does not

arrive.

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

[실습] 칼리 리눅스(192.168.20.50)에서 CentOS 리눅스(192.168.20.200)로 로그인

<!--[if !supportEmptyParas]--> <!--[endif]-->

(KaliLinux)

<!--[if !supportEmptyParas]--> <!--[endif]-->

# telnet 192.168.20.200

root 사용자로 로그인

<!--[if !supportEmptyParas]--> <!--[endif]-->

# export TMOUT=60

timed out waiting for input: auto-logout

Connection closed by foreign host.

-> 가만히 기다린다.

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

TMOUT 변수 설정은 환경 파일에 설정한다.

관리자) /etc/profile, /etc/bashrc

사용자) $HOME/.bash_profile, $HOME/.bashrc (/etc/skel/*)

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->

<!--[if !supportEmptyParas]--> <!--[endif]-->