일반 유저의 ssh 접속 제한 설정
페이지 정보
작성자 서방님 댓글 0건 조회 136회 작성일 14-07-30 08:45본문
etc/ssh/sshd_config 은 sshd 서버 설정 파일.
[ ]# vi /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $
# This is the sshd server system-wide configuration file. See sshd(8) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with OpenSSH is
# to specify options with their
# default value where possible, but leave them commented. Uncommented options change a default value.
Port 22 ssh 사용 기본 포트 지정
Allowusers kangsj sunny root (로그인 허락할 계정 써준다. kangsj와 sunny, root 세 계정만 로그인 허용.)
Protocol 2 .....................
다시 정리
[sshd_config 에서]
AllowGroups : 여기에 등록된 group만 접속 가능함.
AllowUsers : 이곳에 등록된 계정만 접속 가능함.
DenyGroups : 모두 접속이 허용, 여기에 등록된 group만 접속 거부됨.
DenyUsers : 모두 접속이 허용, 여기에 등록된 계정만 접속 거부됨.
예1) test1 와 test2 만 ssh 접속을 허용 space bar로 구분)
AllowUsers test1 test2
예2) 모든 유저의 접속을 허락하고 help 라는 유저의 접속을 막는다.
DenyUsers help
ssh 데몬 재시작
[ ]# /etc/init.d/sshd restart 엔터
댓글목록
등록된 댓글이 없습니다.