RSS구독하기:SUBSCRIBE TO RSS FEED
즐겨찾기추가:ADD FAVORITE
글쓰기:POST
관리자:ADMINISTRATOR

SSH 기타 세팅 및 scp, sftp 사용


SSH 기타 세팅 및 scp, sftp 사용에대해 알아보자

특정 사용자 및 그룹의 로그인 제한

]# man sshd
AllowGroups
            This keyword can be followed by a list of group name patterns, separated by spaces.  
            If specified, login is allowed only for users whose primary group or supplementary group
            list matches one of the patterns.  `*' and `'?  can be used as wildcards in the patterns.  
            Only group names are valid; a numerical group ID is not recognized.  
             By default, login is allowed for all groups.
            (지정된 그룹에 포함된 사용자만이 SSH 로그인을 할 수 있다.
             그룹명은 공백으로 구분하여 와일드 문자(*, ?)를 사용 할 수 있다.)

AllowUsers
            This keyword can be followed by a list of user name patterns, separated by spaces.  If specified,
            login is allowed only for users names that match one of the patterns.  `*' and `'?  can be
            used as wildcards in the patterns.  Only user names are valid; a numerical user ID is not
            recognized.  By default, login is allowed for all users.  If the pattern takes the form USER@HOST
            then USER and HOST are separately checked, restricting logins to particular users from particular
            hosts. (지정된 사용자만이 SSH 로그인을 할 수있다.. 사용법은 AllowGroups과 같다.)

DenyGroups
            This keyword can be followed by a list of group name patterns, separated by spaces.  Login is
            disallowed for users whose primary group or supplementary group list matches one of the
            patterns. `*' and `'?  can be used as wildcards in the patterns.  Only group names are valid; a
            numerical group ID is not recognized. By default, login is allowed for all groups.
            (지정된 그룹에 대한 로그인을 거부한다.)

DenyUsers
            This keyword can be followed by a list of user name patterns, separated by spaces.  Login is
            disallowed for user names that match one of the patterns.  `*' and `'?  can be used as wildcards
            in the patterns.  Only user names are valid; a numerical user ID is not recognized.  By default,
            login is allowed for all users. If the pattern takes the form USER@HOST then USER and HOST are
            separately checked, restricting logins to particular users from particular hosts.
            (지정된 사용자에 대한 로그인을 거부한다.)

6. 원격지 호스트로의 로그인


[in4mania@ilinuxbay in4mania]$ ssh in4mania@192.168.1.154
in4mania@192.168.1.154's password:
Last login: Sun Sep  7 18:36:21 2003 from ns.ilinuxbay.net

7. Allowusers, Denyusers 옵션을 적용한 원격지 로그인 실습
/etc/ssh/sshd_config 파일에 Allowusers와 Denyusers 두개의 옵션을 이용해 각각의 유저를 추가 한 후
원격지에서 ssh 서버에 접근이 가능한지 테스트 해본다.

8. scp 사용법
scp는 자신의 컴퓨터에서 원격의 컴퓨터로 또는 원격의 컴퓨터에서 자신의 컴퓨터로 간단하게
파일을 전송할 수 있는 프로그램이다.
다음은 현재 디렉토리에 있는 sshd.txt 라는 파일을 IP가 192.168.1.154 인 컴퓨터에 root 라는 계정으로
접속하여 /usr/local/src/ 디렉토리 밑에 복사해 넣는 명령이다.


[root@in4nux root]# scp ./sshd.txt root@192.168.1.154:/usr/local/src/

다음은 IP가 192.168.1.154 인 컴퓨터에 root 라는 계정으로 접속하여 /usr/local/src/ 디렉토리 밑에 있는
sshd.txt 라는 이름의 파일을 자신의 컴퓨터로 현재 위치한 디렉토리에 복사하는 명령이다.


[root@in4nux root]# scp root@192.168.1.154:/usr/local/src/sshd.txt ./

9. sftp 사용법

sftp는 대화식의 파일전송 프로그램으로 ftp와 비슷하며, 모든 작동은 암호화된 ssh 전송상에서 실행이 된다.


[root@in4nux ssh]# sftp in4mania@192.168.1.152
Connecting to 192.168.1.152...
in4mania@192.168.1.152's password:
sftp>

10. 윈도우용 ssh
http://www.ssh.com => download => Evaluation Versions => SSH Secure Shell for Workstations

2006/11/14 13:48 2006/11/14 13:48
이 글에는 트랙백을 보낼 수 없습니다
웅쓰:웅자의 상상플러스
웅자의 상상플러스
전체 (379)
게임 (5)
영화 (2)
기타 (23)
맛집 (5)
영어 (2)
대수학 (3)
형태소 (5)
Hacking (9)
Linux (112)
HTML (48)
Application_developing (48)
Web_developing (102)
Window (11)
«   2024/04   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
  1. 2016/01 (1)
  2. 2015/12 (3)
  3. 2015/10 (3)
  4. 2015/03 (2)
  5. 2015/01 (4)