I LOVE MUSIC
.rhosts, /etc/hosts.equiv 파일 관련 설정정보 본문
※ SunOS 5.8 장비 기준으로 작성.
▶ 'r' commands (rsh, rlogin, rshell) 활성화
■ 설정방법
"/etc/inetd.conf" 파일에서 해당 라인 # 처리(주석처리) 제거 후 inetd 재 시동
# vi /etc/inetd.conf
#shell stream tcp nowait root /usr/sbin/in.rshd in.rshd (수정 전)
#shell stream tcp nowait root /usr/sbin/in.rshd in.rshd (수정 전)
#shell stream tcp6 nowait root /usr/sbin/in.rshd in.rshd (수정 전)
#login stream tcp6 nowait root /usr/sbin/in.rlogind in.rlogind (수정 전)
#exec stream tcp nowait root /usr/sbin/in.rexecd in.rexecd (수정 전)
#exec stream tcp6 nowait root /usr/sbin/in.rexecd in.rexecd (수정 전)
shell stream tcp nowait root /usr/sbin/in.rshd in.rshd (수정 후)
shell stream tcp6 nowait root /usr/sbin/in.rshd in.rshd (수정 후)
login stream tcp6 nowait root /usr/sbin/in.rlogind in.rlogind (수정 후)
exec stream tcp nowait root /usr/sbin/in.rexecd in.rexecd (수정 후)
exec stream tcp6 nowait root /usr/sbin/in.rexecd in.rexecd (수정 후)
# ps -ef | grep inetd
root PID숫자 1 0
# kill -HUP PID숫자
( 서비스 중인 장비에서 위 명령어를 실행 시에는 주의를 요합니다. )
-HUP 옵션 :
1. SIGHUP(HUP) : 연결끊기. 프로세스의 설정파일을 다시 읽는데 사용된다.
▶ 신뢰관계 설정
/etc/hosts.equiv 파일과 $HOME/.rhosts 파일에서 “+”를 제거하고 반드시 접근을 허용할 호스트 및 계정만 등록할 것
■ 설정방법
(송신 측, 수신 측 양쪽에 설정해줌.)
#vi /etc/hosts.equiv ( or $HOME/.rhosts)
[송,수신측 IP주소 or hostname] [접근을 허용할 계정]
Ex)
10.10.10.10 root
Log_server suser
▶ hosts.equiv 파일 권한 설정
# chown root /etc/hosts.equiv
# chmod 400 /etc/hosts.equiv
# chown root /.rhosts
# chmod 400 /.rhosts
▶ rcopy 명령어 사용법
다음과 같이 moon 서버에 설치한 Oracle 을 earth 서버로 remote copy 한다.
moon:/> rcp -rp /export/home/Oracle earth:/export/home |
옵션은 다음과 같다.
r : sub directory (하위 디렉토리) 포함해서 remote copy
'r' 옵션을 사용할 경우, source, target 은 copy 할 대상 디렉토리와, 대상 디렉토리가 위치할 경로를 지정한다.
p : 파일 속성까지 remote copy
파일 생성 시간 등, 파일의 속성을 그대로 보존한다.
위에서, "earth:/export/home" 은, "원격 호스트명:경로" 를 의미한다.
▶ 참고 사이트
▶ rcopy 이용 방법 설명
http://blog.nice2seeyou.com/mike/131
▶ rcopy 명령어 관련 설명
http://unix.co.kr/bbs/board.php?bo_table=02_23&wr_id=11
▶ /etc/hosts.equiv 파일 관련 설명
http://unix.co.kr/bbs/board.php?bo_table=03_4&wr_id=711&sca=H
'주통기반 > 관련지식' 카테고리의 다른 글
Finger 서비스 관련 정보 (0) | 2016.03.02 |
---|---|
tcp Wrapper 관련 정보 (0) | 2016.02.26 |
/dev 관련 기본 정보 (0) | 2016.02.26 |
SUID, SGID, Sticky bit 관련 정보 (0) | 2016.02.26 |
/etc/services 관련 정보 (0) | 2016.02.25 |