Linux

SSH 환경설정

Jack Moon 2012. 10. 8. 16:40

 

설정파일 경로 : /etc/sshd/sshd_config

 

AllowUsers root nextline
로그인 허락할 계정 nextline와 root 두 계정에게만 로그인 허용 합니다.

PermitRootLogin no
root 로그인 허용여부를 결정하는 것입니다. yes, no, without-password를 사용할 수 있습니다. 현재 no로 되어 있기 때문에 직접  root로 접속이 불가능합니다. 이옵션을 yes 로 하기보다는 일반계정으로 로그인후 su 명령으로 root로 전환하는 것이 보안상 안전합니다.

AllowHosts   1.2.3.0/24 192.168.1.3
로그인을 허가할 IP 또는 IP 대역을 지정합니다. 여러 개일 경우에는 공란이나 "," 로 구분하여 나열하면 되고 도메인 이름일 경우에는 reverse mapping이 제공되어야 합니다.

PasswordGuesses   3
암호인증 방식으로 인증할 때 최대 몇 차례 시도를 허용할 것인지 지정합니다.




특정 IP만 접속 허용하기

 

[root@localhost ~]# cat /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.

#

sshd:ALL

[root@localhost ~]# cat /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:258.587.94.37, 192.168.0.5

'Linux' 카테고리의 다른 글

VNCSERVER 설정  (0) 2012.10.08
vi editor 정리  (0) 2012.10.08
rsync 원격백업설정  (0) 2012.10.08
PHP configure 에러관련 yum 설치  (0) 2012.10.08
pear Spreadsheet_Excel_Writer 설치  (0) 2012.10.08