[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.17

1.17    ! jmc         1: .\"    $OpenBSD: rsh.1,v 1.16 2007/03/20 15:46:51 jmc 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: .\"
1.17    ! jmc        32: .Dd $Mdocdate$
1.1       deraadt    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.
1.16      jmc        76: .It Fl l Ar username
1.1       deraadt    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.15      millert    92: .Xr ssh 1 .
1.7       aaron      93: .Pp
                     94: If
                     95: .Nm
                     96: is not invoked with the standard program name
                     97: .Pq Dq rsh ,
                     98: it uses this name as its
                     99: .Ar hostname
                    100: argument.
1.1       deraadt   101: .Pp
1.4       aaron     102: Shell meta-characters which are not quoted are interpreted on local machine,
                    103: while quoted meta-characters are interpreted on the remote machine.
1.1       deraadt   104: For example, the command
                    105: .Pp
1.12      deraadt   106: .Dl $ rsh otherhost cat remotefile >> localfile
1.1       deraadt   107: .Pp
                    108: appends the remote file
                    109: .Ar remotefile
                    110: to the local file
                    111: .Ar localfile ,
                    112: while
                    113: .Pp
1.12      deraadt   114: .Dl $ rsh otherhost cat remotefile \&">>\&" other_remotefile
1.1       deraadt   115: .Pp
                    116: appends
                    117: .Ar remotefile
                    118: to
                    119: .Ar other_remotefile .
                    120: .\" .Pp
                    121: .\" Many sites specify a large number of host names as commands in the
                    122: .\" directory /usr/hosts.
                    123: .\" If this directory is included in your search path, you can use the
                    124: .\" shorthand ``host command'' for the longer form ``rsh host command''.
                    125: .Sh FILES
                    126: .Bl -tag -width /etc/hosts -compact
                    127: .It Pa /etc/hosts
                    128: .El
                    129: .Sh SEE ALSO
1.15      millert   130: .Xr ssh 1 ,
1.3       deraadt   131: .Xr rcmd 3
1.1       deraadt   132: .Sh HISTORY
                    133: The
1.6       aaron     134: .Nm
1.1       deraadt   135: command appeared in
                    136: .Bx 4.2 .
                    137: .Sh BUGS
                    138: If you are using
1.6       aaron     139: .Xr csh 1
1.1       deraadt   140: and put a
1.6       aaron     141: .Nm
1.1       deraadt   142: in the background without redirecting its input away from the terminal,
                    143: it will block even if no reads are posted by the remote command.
                    144: If no input is desired you should redirect the input of
1.6       aaron     145: .Nm
1.1       deraadt   146: to
                    147: .Pa /dev/null
                    148: using the
                    149: .Fl n
                    150: option.
                    151: .Pp
                    152: Stop signals stop the local
1.6       aaron     153: .Nm
1.1       deraadt   154: process only; this is arguably wrong, but currently hard to fix for reasons
                    155: too complicated to explain here.