rsh, rlogin 사용 방법은 무엇인가요?
💡 요약 정리
- rsh와 rlogin 명령어 사용을 위해 서버와 클라이언트에서 각각 설정이 필요합니다.
- krb5-workstation 패키지를 삭제하여 올바른 명령어 경로를 사용합니다.
- xinetd 데몬을 재시작하고 /etc/securetty, /etc/hosts 등의 설정을 수정해야 합니다.
- 모든 서버 간 접속이 가능하도록 hosts.equiv 및 .rhosts 파일을 구성합니다.
1. login server 설정
① rsh, rsh-server 패키지 확인
- 패키지가 설치되지 않았다면
yum install로 설치해야 합니다.
[root@localhost ~]$ rpm -qa | grep rsh
rsh-0.17-40.el5
rsh-server-0.17-40.el5
② krb5-workstation 패키지 삭제
- krb5-workstation에 포함된
/usr/kerberos/bin/rsh,/usr/kerberos/bin/rlogin대신/usr/bin/rsh,/usr/bin/rlogin을 사용하기 위함입니다.
[root@localhost ~]$ rpm -e krb5-workstation
③ rsh, rlogin 활성화
[root@localhost ~]$ chkconfig rsh on
[root@localhost ~]$ chkconfig rlogin on
[root@localhost ~]$ service xinetd restart
xinetd 를 정지 중: [ OK ]
xinetd (을)를 시작 중: [ OK ]
④ /etc/securetty 파일 하단에 rsh, rlogin 추가
[root@localhost ~]$ cat /etc/securetty
console
vc/1
~ ~
tty8
tty9
tty10
tty11
rsh
rlogin
⑤ /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.11 www1
192.168.0.12 www2
2. client 설정
① rsh, rsh-server 패키지 확인
- 패키지가 설치되지 않았다면
yum install로 설치해야 합니다.
[root@www1 ~]$ rpm -qa | grep rsh
rsh-0.17-40.el5
rsh-server-0.17-40.el5
② krb5-workstation 패키지 삭제
- krb5-workstation에 포함된
/usr/kerberos/bin/rsh,/usr/kerberos/bin/rlogin대신/usr/bin/rsh,/usr/bin/rlogin을 사용하기 위함입니다.
[root@www1 ~]$ rpm -e krb5-workstation
③ rsh, rlogin 활성화
[root@www1 ~]$ chkconfig rsh on
[root@www1 ~]$ chkconfig rlogin on
[root@www1 ~]$ service xinetd restart
xinetd 를 정지 중: [ OK ]
xinetd (을)를 시작 중: [ OK ]
④ /etc/securetty 파일 하단에 rsh, rlogin 추가
[root@www1 ~]$ cat /etc/securetty
console
vc/1
~ ~
tty8
tty9
tty10
tty11
rsh
rlogin
⑤ /etc/hosts.equiv 파일 생성 후 server의 IP 또는 hostname 입력
[root@www1 ~]$ cat /etc/hosts.equiv
192.168.0.5