[BACK]Return to rsh.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / rsh

Annotation of src/usr.bin/rsh/rsh.1, Revision 1.14

1.14    ! jmc         1: .\"    $OpenBSD: rsh.1,v 1.13 2003/06/03 02:56:15 millert Exp $
1.6       aaron       2: .\"
1.1       deraadt     3: .\" Copyright (c) 1983, 1990 The Regents of the University of California.
                      4: .\" All rights reserved.
                      5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\" 1. Redistributions of source code must retain the above copyright
                     10: .\"    notice, this list of conditions and the following disclaimer.
                     11: .\" 2. Redistributions in binary form must reproduce the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer in the
                     13: .\"    documentation and/or other materials provided with the distribution.
1.13      millert    14: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    15: .\"    may be used to endorse or promote products derived from this software
                     16: .\"    without specific prior written permission.
                     17: .\"
                     18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     21: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     28: .\" SUCH DAMAGE.
                     29: .\"
                     30: .\"    from: @(#)rsh.1 6.10 (Berkeley) 7/24/91
                     31: .\"
                     32: .Dd July 24, 1991
                     33: .Dt RSH 1
1.5       aaron      34: .Os
1.1       deraadt    35: .Sh NAME
                     36: .Nm rsh
                     37: .Nd remote shell
                     38: .Sh SYNOPSIS
                     39: .Nm rsh
1.14    ! jmc        40: .Op Fl dn
1.1       deraadt    41: .Op Fl l Ar username
1.7       aaron      42: .Ar hostname
1.4       aaron      43: .Op Ar command
1.1       deraadt    44: .Sh DESCRIPTION
1.6       aaron      45: .Nm
1.1       deraadt    46: executes
                     47: .Ar command
                     48: on
1.7       aaron      49: .Ar hostname .
1.1       deraadt    50: .Pp
1.11      millert    51: .Em Note:
                     52: .Nm
                     53: has been deprecated in favor of
                     54: .Xr ssh 1 .
                     55: Use of
                     56: .Nm
                     57: is discouraged due to the inherent insecurity of host-based authentication.
                     58: .Pp
1.6       aaron      59: .Nm
1.1       deraadt    60: copies its standard input to the remote command, the standard
                     61: output of the remote command to its standard output, and the
                     62: standard error of the remote command to its standard error.
                     63: Interrupt, quit and terminate signals are propagated to the remote
                     64: command;
1.6       aaron      65: .Nm
1.1       deraadt    66: normally terminates when the remote command does.
1.6       aaron      67: .Pp
1.1       deraadt    68: The options are as follows:
1.8       aaron      69: .Bl -tag -width Ds
1.1       deraadt    70: .It Fl d
1.7       aaron      71: Enable socket debugging (using
1.6       aaron      72: .Xr setsockopt 2 )
1.1       deraadt    73: on the
                     74: .Tn TCP
                     75: sockets used for communication with the remote host.
                     76: .It Fl l
                     77: By default, the remote username is the same as the local username.
                     78: The
                     79: .Fl l
                     80: option allows the remote name to be specified.
                     81: .It Fl n
1.7       aaron      82: Redirect input from the special device
1.1       deraadt    83: .Pa /dev/null
                     84: (see the
                     85: .Sx BUGS
                     86: section of this manual page).
                     87: .El
                     88: .Pp
                     89: If no
                     90: .Ar command
                     91: is specified, you will be logged in on the remote host using
1.11      millert    92: .Nm rlogin
                     93: if it exists on the system or
                     94: .Xr telnet 1
                     95: if not.
1.7       aaron      96: .Pp
                     97: If
                     98: .Nm
                     99: is not invoked with the standard program name
                    100: .Pq Dq rsh ,
                    101: it uses this name as its
                    102: .Ar hostname
                    103: argument.
1.1       deraadt   104: .Pp
1.4       aaron     105: Shell meta-characters which are not quoted are interpreted on local machine,
                    106: while quoted meta-characters are interpreted on the remote machine.
1.1       deraadt   107: For example, the command
                    108: .Pp
1.12      deraadt   109: .Dl $ rsh otherhost cat remotefile >> localfile
1.1       deraadt   110: .Pp
                    111: appends the remote file
                    112: .Ar remotefile
                    113: to the local file
                    114: .Ar localfile ,
                    115: while
                    116: .Pp
1.12      deraadt   117: .Dl $ rsh otherhost cat remotefile \&">>\&" other_remotefile
1.1       deraadt   118: .Pp
                    119: appends
                    120: .Ar remotefile
                    121: to
                    122: .Ar other_remotefile .
                    123: .\" .Pp
                    124: .\" Many sites specify a large number of host names as commands in the
                    125: .\" directory /usr/hosts.
                    126: .\" If this directory is included in your search path, you can use the
                    127: .\" shorthand ``host command'' for the longer form ``rsh host command''.
                    128: .Sh FILES
                    129: .Bl -tag -width /etc/hosts -compact
                    130: .It Pa /etc/hosts
                    131: .El
                    132: .Sh SEE ALSO
1.11      millert   133: .Xr telnet 1 ,
1.3       deraadt   134: .Xr rcmd 3
1.1       deraadt   135: .Sh HISTORY
                    136: The
1.6       aaron     137: .Nm
1.1       deraadt   138: command appeared in
                    139: .Bx 4.2 .
                    140: .Sh BUGS
                    141: If you are using
1.6       aaron     142: .Xr csh 1
1.1       deraadt   143: and put a
1.6       aaron     144: .Nm
1.1       deraadt   145: in the background without redirecting its input away from the terminal,
                    146: it will block even if no reads are posted by the remote command.
                    147: If no input is desired you should redirect the input of
1.6       aaron     148: .Nm
1.1       deraadt   149: to
                    150: .Pa /dev/null
                    151: using the
                    152: .Fl n
                    153: option.
                    154: .Pp
                    155: You cannot run an interactive command
                    156: (like
1.6       aaron     157: .Xr rogue 6
1.1       deraadt   158: or
1.6       aaron     159: .Xr vi 1 )
1.1       deraadt   160: using
1.6       aaron     161: .Nm rsh ;
1.1       deraadt   162: use
1.11      millert   163: .Xr telnet 1
1.1       deraadt   164: instead.
                    165: .Pp
                    166: Stop signals stop the local
1.6       aaron     167: .Nm
1.1       deraadt   168: process only; this is arguably wrong, but currently hard to fix for reasons
                    169: too complicated to explain here.