Rsh

提供: Wikinote
2013年11月14日 (木) 21:35時点におけるHagio (トーク | 投稿記録)による版

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索

もう ssh でいいじゃんと言いたくなる、obsolete なサービスの 1 つ。 しかし、職業柄、扱うこともあるので仕方なくメモしておく。

設定

CentOS 5 では、rsh-server パッケージが必要。

# rpm -q rsh-server
rsh-server-0.17-40.el5_7.1

chkconfig に rsh ができるので、これを on にする。 特に xinetd を再起動する必要は無い。

# chkconfig --list rsh
rsh             off
# chkconfig rsh on
# chkconfig --list rsh
rsh             on

実行したいユーザのホームディレクトリに、.rhosts ファイルを作成する。

$ ls -l .rhosts 
-rw-r--r-- 1 hagio hagio 10 11月 14 21:12 .rhosts
$ cat .rhosts
192.168.1.1
192.168.1.10 hagio

ポートは、512-1023 辺りが使用されるので、必要に応じて開けておく。

$ /usr/bin/rsh -l hagio lucida date
2013年 11月 14日 木曜日 21:25:48 JST