본문 바로가기

작업일지/Linux

SSH 로긴시 딜레이 현상

ssh로긴시 지연되는 현상이 발생할때 해결하는 방법.




/etc/ssh/ssh_config에 "UseDNS no"를 추가한다.



~# vi /etc/ssh/ssh_config


# ssh_config(5) for more information.  This file provides defaults for

# users, and the values can be changed in per-user configuration files

# or on the command line.


# Configuration data is parsed as follows:

#  1. command line options

#  2. user-specific file

#  3. system-wide file

# Any configuration value is only changed the first time it is set.

# Thus, host-specific definitions should be at the beginning of the

# configuration file, and defaults at the end.


# Site-wide defaults for some commonly used options.  For a comprehensive

# list of available options, their meanings and defaults, please see the

# ssh_config(5) man page.

.
.
.
.
UseDNS no     <= 추가




그래도 지연 된다면 /etc/ssh/ssh_config에 "ReverseMappingCheck no"를 추가한다.



~# vi /etc/ssh/ssh_config


# ssh_config(5) for more information.  This file provides defaults for

# users, and the values can be changed in per-user configuration files

# or on the command line.


# Configuration data is parsed as follows:

#  1. command line options

#  2. user-specific file

#  3. system-wide file

# Any configuration value is only changed the first time it is set.

# Thus, host-specific definitions should be at the beginning of the

# configuration file, and defaults at the end.


# Site-wide defaults for some commonly used options.  For a comprehensive

# list of available options, their meanings and defaults, please see the

# ssh_config(5) man page.

.
.
.
.
ReverseMappingCheck no     <= 추가




그래도 지연 된다면 hosts파일에 호스트 아이피를 적어준다.



~# vi /etc/hosts


127.0.0.1       localhost

::1             localhost ip6-localhost ip6-loopback

fe00::0         ip6-localnet

ff00::0         ip6-mcastprefix

ff02::1         ip6-allnodes

ff02::2         ip6-allrouters

192.168.1.100   mongin      <= 추가




dns reverse lookup문제일거라는데 ssh쪽에 설정해봐도 안되는 때가 있다.

이때는 hosts파일을 수정하면된다.

정확한 것은 ssh 로긴시 verbose모드로 로긴하면 지연되는 부분을 찾을 수 있다. (verbose모드는 로긴시 -v를 사용)