[Linux CentOS - (17) ] SFTP만 되는 계정 생성
SFTP만 되는 계정 생성Shell 로그인 권한은 없고 SFTP만 접속할 수 있는 계정 설정하기
nologin 계정에 SFTP를 허용하는 방법
## CentOS 6 버전에서 테스트 완료 ##
1. 로그인 Shell 권한 없는 계정 생성
useradd -s /sbin/nologin 계정이름
2. 패스워드 설정
passwd 계정이름
3. sshd_config 수정
/etc/ssh/sshd_config 파일에서 아래 라인 수정
수정 전 : Subsystem sftp /usr/libexec/openssh/sftp-server
수정 후 : Subsystem sftp internal-sftp
4. SSH 데몬 재기동
service sshd restart
이 방법은 엄밀히 말하면 "nologin 계정에 SFTP를 허용하는 방법" 이라 할 수 있다.
참고
1. https://zetawiki.com/wiki/SFTP%EB%A7%8C_%EB%90%98%EB%8A%94_%EA%B3%84%EC%A0%95_%EC%83%9D%EC%84%B1
SFTP만 되는 계정 생성 - 제타위키
CentOS 6.3에서 테스트하였습니다. SFTP만 되는 계정 생성 Shell 로그인 권한은 없고 SFTP만 접속할 수 있는 계정 설정하기 nologin 계정에 SFTP를 허용하는 방법 1 계정 생성[편집] useradd -s /sbin/nologin -G sftp-only 계정명 → -G 옵션은 useradd 그룹 지정하여 만들기 참고 [root@zetawiki ~]# useradd -s /sbin/nologin -G sftp-only sftpuser
zetawiki.com
2. https://en.wikibooks.org/wiki/OpenSSH/Cookbook/File_Transfer_with_SFTP#SFTP-only_Accounts
OpenSSH/Cookbook/File Transfer with SFTP - Wikibooks, open books for an open world
Basic SFTP service requires no additional setup, it is a built-in part of the OpenSSH server and it is the subsystem sftp-server(8) which then implements an SFTP file transfer. See the manual page for sftp-server(8). Alternately, the subsystem internal-sft
en.wikibooks.org
3. https://serverfault.com/questions/275002/openssh-sftp-with-chroot-how-to-change-password
OpenSSH SFTP with Chroot, how to change password
I have setup up ssh with chrooted directory where users only can use sftp and access a directory and all is child folders. The only problem I have is that I need to let the users change their pass...
serverfault.com
3
'◽ CentOS' 카테고리의 다른 글
[Linux CentOS - (19) ] linux tomcat clean (톰캣 클린) (0) | 2020.05.08 |
---|---|
[Linux CentOS] rpm 관련 오류 옵션 넣어서 강제 처리. (0) | 2020.05.07 |
[Linux CentOS - (18) ] mv : 파일이동 // rm -rf 폴더 강제 삭제 (0) | 2020.05.06 |
[Linux CentOS] "/sbin/nologin"란 무슨 의미인가? (0) | 2020.04.23 |
[Linux CentOS - (16) ] cat : 파일 화면에 출력하기 (0) | 2020.04.13 |
[Linux CentOS - (15) ] 디스크 용량 확인 (df/du) (0) | 2020.04.03 |
[Linux CentOS - (14) ] 네트워크 정보 확인 : "ifconfig" 대체 "ip addr" (0) | 2020.01.29 |