YoonWould!!

[문제해결]특정 IP만 SSH 접속 허용하기 본문

<인턴생활>/[리눅스]

[문제해결]특정 IP만 SSH 접속 허용하기

Hading 2019. 4. 9. 11:45
728x90

방법 : 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: xxx.xxx.xxx.xxx

 

-> xxx.xxx.xxx.xxx IP에게 접속 허용

 

많은 IP를 관리하려면 

 

sshd: xxx.xxx.xxx.xxx

sshd: bbb.bbb.bbb.bbb

 

이런식으로 관리 가능

 

수정 후에는 

 

  • systemctl restart sshd 수행

 

 

 

728x90