ssh_exchange_identification: Connection closed by remote host
or
ssh_exchange_identification: connection reset by peer
결론을 말하자면
host.allow host.deny를 수정하면 된다.
/etc/hosts.allow
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
sshd: 192.168.124.12
sshd: 132.79.44.
sshd: 133.11.
hosts.allow 예시
위와 같이 설정하면 sshd: 192.168.124.12, 132.79.44.XXX, 133.11.XXX.XXX 대역을 허용한다는 의미가 된다.
이때 sshd를 나눠 안적고 ','를 이용하여 다 같이 적어도된다.
/etc/hosts.deny 수정
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
sshd: ALL
hosts.deny 파일을 수정하면
hosts.allow에 지정한 것 외 나머지는 모두 ssh 접근이가능하다