rsh 구성 방법 CentOS 6.6
SERVER설정
1. rsh, rsh-server 패키지 확인
- 패키지가 설치되어 있지 않으면 yum install로 설치
[root@localhost ~]rpm -qa | grep rsh
rsh-0.17-40.el5
rsh-server-0.17-40.el5
2. krb5-workstation 패키지 삭제
- krb5-workstation에 포함된 /usr/kerberos/bin/rsh, /usr/kerberos/bin/rlogin 명령어 대신 /usr/bin/rsh, /usr/bin/rlogin 을 사용하기 위해서
[root@localhost ~]rpm -e krb5-workstation
3.# vi /etc/pam.d/rsh
# vi /etc/pam.d/rlogin
#auth required pam_securetty.so 주석처리
4. rsh rlogin 활성화
[root@localhost ~]chkconfig rsh on
[root@localhost ~]chkconfig rlogin on
[root@localhost ~]service xinetd restart
xinetd 를 정지 중: [ OK ]
xinetd (을)를 시작 중: [ OK ]
5. /etc/securetty 파일 하단에 rsh rlogin 추가
[root@localhost ~]cat /etc/securetty
console
vc/1
~ ~
tty8
tty9
tty10
tty11
rsh
rlogin
5. /etc/hosts 파일에 node 추가
[root@localhost ~]cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
~ ~
192.168.0.71 www1
192.168.0.72 www2
192.168.0.73 www3
192.168.0.74 www4
192.168.0.75 www5
192.168.0.76 www6
192.168.0.77 www7
Client 설정
1. rsh, rsh-server 패키지 확인
- 패키지가 설치되어 있지 않으면 yum install로 설치
[root@www1 ~]rpm -qa | grep rsh
rsh-0.17-40.el5
rsh-server-0.17-40.el5
2. krb5-workstation 패키지 삭제
- krb5-workstation에 포함된 /usr/kerberos/bin/rsh, /usr/kerberos/bin/rlogin 명령어 대신 /usr/bin/rsh, /usr/bin/rlogin 을 사용하기 위해서
[root@www1 ~]rpm -e krb5-workstation
3.# vi /etc/pam.d/rsh
# vi /etc/pam.d/rlogin
#auth required pam_securetty.so 주석처리
4. rsh rlogin 활성화
[root@www1 ~]chkconfig rsh on
[root@www1 ~]chkconfig rlogin on
[root@www1 ~]service xinetd restart
xinetd 를 정지 중: [ OK ]
xinetd (을)를 시작 중: [ OK ]
5. /etc/securetty 파일 하단에 rsh rlogin 추가
[root@www1 ~]cat /etc/securetty
console
vc/1
~ ~
tty8
tty9
tty10
tty11
rsh
rlogin
6. /etc/hosts.equiv 파일을 생성하고 server의 ip나 hostname을 입력한다
[root@www1 ~]cat /etc/hosts.equiv
192.168.0.33
7. /root/.rhosts 파일을 생성하고 server의 ip나 hostname을 입력한다
[root@www1 ~]cat /root/.rhosts
192.168.0.33
rsh 호스트네임 명령어를 통하여 서버단에서 접속이 잘되는 지 확인
혹시라도 no route host 메세지가 나온다면 클라이언트 방화벽이 disable되어 있는지 확인해 본다.