doc/ja/man/man1/rsh.1
Hiroyuki Hanai 8384f4bcfc Import Japanese Online Manuals.
The Japanese Manual team(man-jp@jp.FreeBSD.ORG) has translated
and keeps maintaining them.
Submitted by: Kazuo Horikawa <horikawa@isrd.hitachi.co.jp>
1998-02-25 04:54:20 +00:00

190 lines
5.3 KiB
Groff

.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)rsh.1 8.1 (Berkeley) 6/6/93
.\" jpman %Id: rsh.1,v 1.2 1997/05/13 00:56:14 mutoh Stab %
.\"
.Dd June 6, 1993
.Dt RSH 1
.Os BSD 4.2
.Sh 名称
.Nm rsh
.Nd リモートマシン上でコマンドを実行する
.Sh 書式
.Nm
.Op Fl Kdnx
.Op Fl t Ar timeout
.Op Fl k Ar realm
.Op Fl l Ar username
.Ar host
.Op command
.Sh 解説
.Nm
.Ar host
で指定したホスト上で、
.Ar command
で指定したコマンドを実行します。
.Pp
.Nm
は、標準入力をリモートコマンドに対してコピーします。また、リモートコマンドの
標準出力を、
.Nm
の標準出力に、リモートコマンドの標準エラー出力を、
.Nm
の標準エラー出力にコピーします。
SIGINT, SIGQUIT, SIGTERM の各シグナルに関しては、
リモートコマンドに対して通知されます。
.Nm
は、リモートコマンドが正常終了した場合には正常終了します。本コマンドは、
以下のオプションが使用可能です。
.Bl -tag -width flag
.It Fl K
Keroberos による全てのユーザ認証を行いません。
.It Fl d
.Nm
.Xr setsockopt 2
を用いて、リモートホストとの通信に用いられる
.Tn TCP
ソケットのデバッグを有効にします。
.It Fl k
.Nm
はリモートホストに対して
.Xr krb_realmofhost 3
によって定義されるリモートホストの realm の代わりに、指定した
.Ar realm
を使用して、リモートホストに対してのアクセス許可を得ます。
.It Fl l
デフォルトでは、ローカルユーザ名とリモートホスト上のユーザ名は同じで
す。
.Fl l
オプションにより、リモートホスト上でのユーザ名を指定できます。
ユーザ認証には
.Xr rlogin 1
と同様の仕組みにより Kerberos によるユーザ認証機構が使われます。
.It Fl n
.Nm
の入力を、特殊デバイス
.Pa /dev/null
にします(
.Sx バグ
の項を参照してください)。
.It Fl x
すべてのデータ交換に
.Tn DES
による暗号化を有効にします。これを用いると
レスポンスが著しく悪くなるかも知れません。
.It Fl t
.Fl t
オプションは、秒で表現されるタイムアウトを指定します。この時間の間、
データが送られも受け取りもされない場合、 rsh は終了します。
.El
.Pp
.Ar command
が指定されない場合には、ユーザは
.Xr rlogin 1
を用いてリモートホストにログインします。
.Pp
クォートされていないシェルのメタキャラクタについては、ローカルマシン上
で解釈され、クォートされているメタキャラクタはリモートホスト上で解釈
されます。例えば、
.Pp
.Dl rsh otherhost cat remotefile >> localfile
.Pp
については、リモートマシン上のファイル
.Ar remotefile
を、ローカルマシン上のファイル
.Ar localfile
に追加します。一方
.Pp
.Dl rsh otherhost cat remotefile \&">>\&" other_remotefile
.Pp
については、リモートマシン上の
.Ar remotefile
.Ar other_remotefile
に追加します。
.\" .Pp
.\" Many sites specify a large number of host names as commands in the
.\" directory /usr/hosts.
.\" If this directory is included in your search path, you can use the
.\" shorthand ``host command'' for the longer form ``rsh host command''.
.Sh 関連ファイル
.Bl -tag -width /etc/hosts -compact
.It Pa /etc/hosts
.El
.Sh 関連項目
.Xr rlogin 1 ,
.Xr setsockopt 2 ,
.Xr kerberos 3 ,
.Xr krb_realmofhost 3 ,
.Xr krb_sendauth 3 ,
.Xr rcmd 3 ,
.Xr ruserok 3 ,
.Xr hosts 5 ,
.Xr rlogind 8 ,
.Xr rshd 8
.Sh 歴史
The
.Nm
コマンドは
.Bx 4.2
から登場しました。
.Sh バグ
.Xr csh 1
を用いて
.Nm
を標準入力からのリダイレクトなしにバックグラウンドで実行する場合、
たとえリモートコマンドの入力がなくても(必ず)ブロックされるでしょう。
リダイレクトで
.Nm
に入力を渡す必要がなければ、
.Fl n
オプションを用いてリモートコマンドの入力元を
.Pa /dev/null
に切替えてください。
.Pp
.Nm
を用いて、
.Xr rogue 6
.Xr vi 1
のような会話的コマンドを実行することはできません
代わりに
.Xr rlogin 1
を使用してください。
.Pp
SIGSTOP は、ローカルマシンの
.Nm
プロセスを停止させるだけです。これはおそらく良くない動作です.
しかし、これを直すことは、現時点では困難です。ここでその理由を説明す
るにはあまりに複雑なので、理由については割愛します。