Index: head/bin/rcp/rcp.1 =================================================================== --- head/bin/rcp/rcp.1 (revision 320643) +++ head/bin/rcp/rcp.1 (revision 320644) @@ -1,151 +1,160 @@ .\"- .\" 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. 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. .\" .\" @(#)rcp.1 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd October 16, 2002 +.Dd July 3, 2017 .Dt RCP 1 .Os .Sh NAME .Nm rcp .Nd remote file copy .Sh SYNOPSIS .Nm .Op Fl 46p .Ar file1 file2 .Nm .Op Fl 46pr .Ar .Ar directory +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm utility copies files between machines. Each .Ar file or .Ar directory argument is either a remote file name of the form .Dq ruser@rhost:path , or a local file name (containing no .Ql :\& characters, or a .Ql / before any .Ql :\& Ns s). .Pp The following options are available: .Bl -tag -width indent .It Fl 4 Use IPv4 addresses only. .It Fl 6 Use IPv6 addresses only. .It Fl p Cause .Nm to attempt to preserve (duplicate) in its copies the modification times and modes of the source files, ignoring the .Xr umask 2 . By default, the mode and owner of .Ar file2 are preserved if it already existed; otherwise the mode of the source file modified by the .Xr umask 2 on the destination host is used. .It Fl r If any of the source files are directories, .Nm copies each subtree rooted at that name; in this case the destination must be a directory. .El .Pp If .Ar path is not a full path name, it is interpreted relative to the login directory of the specified user .Ar ruser on .Ar rhost , or your current user name if no other remote user name is specified. A .Ar path on a remote host may be quoted (using .Ql \e , .Ql \&" , or .Ql \(aa ) so that the metacharacters are interpreted remotely. .Pp The .Nm utility does not prompt for passwords; it performs remote execution via .Xr rsh 1 , and requires the same authorization. .Pp The .Nm utility handles third party copies, where neither source nor target files are on the current machine. .Sh SEE ALSO .Xr cp 1 , .Xr ftp 1 , .Xr rlogin 1 , .Xr rsh 1 , .Xr hosts.equiv 5 .Sh HISTORY The .Nm command appeared in .Bx 4.2 . The version of .Nm described here has been reimplemented with Kerberos in .Bx 4.3 Reno . .Sh BUGS Does not detect all cases where the target of a copy might be a file in cases where only a directory should be legal. .Pp Is confused by any output generated by commands in a .Pa .login , .Pa .profile , or .Pa .cshrc file on the remote host. .Pp The destination user and hostname may have to be specified as .Dq rhost.ruser when the destination machine is running the .Bx 4.2 version of .Nm . Index: head/libexec/rlogind/rlogind.8 =================================================================== --- head/libexec/rlogind/rlogind.8 (revision 320643) +++ head/libexec/rlogind/rlogind.8 (revision 320644) @@ -1,193 +1,202 @@ .\" Copyright (c) 1983, 1989, 1991, 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. 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. .\" .\" @(#)rlogind.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 9, 2005 +.Dd July 3, 2017 .Dt RLOGIND 8 .Os .Sh NAME .Nm rlogind .Nd remote login server .Sh SYNOPSIS .Nm .Op Fl Daln +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm utility is the server for the .Xr rlogin 1 program. The server provides a remote login facility with authentication based on privileged port numbers from trusted hosts. .Pp Options supported by .Nm : .Bl -tag -width indent .It Fl D Set TCP_NODELAY socket option. This improves responsiveness at the expense of some additional network traffic. .It Fl a Ask hostname for verification. .It Fl l Prevent any authentication based on the user's .Dq Pa .rhosts file, unless the user is logging in as the superuser. .It Fl n Disable keep-alive messages. .El .Pp The .Nm utility listens for service requests at the port indicated in the .Dq login service specification; see .Xr services 5 . When a service request is received the following protocol is initiated: .Bl -enum .It The server checks the client's source port. If the port is not in the range 512-1023, the server aborts the connection. .It The server checks the client's source address and requests the corresponding host name (see .Xr gethostbyaddr 3 , .Xr hosts 5 and .Xr named 8 ) . If the hostname cannot be determined, the dot-notation representation of the host address is used. If the hostname is in the same domain as the server (according to the last two components of the domain name), or if the .Fl a option is given, the addresses for the hostname are requested, verifying that the name and address correspond. Normal authentication is bypassed if the address verification fails. .El .Pp Once the source port and address have been checked, .Nm proceeds with the authentication process described in .Xr rshd 8 . It then allocates a pseudo terminal (see .Xr pty 4 ) , and manipulates file descriptors so that the slave half of the pseudo terminal becomes the .Em stdin , .Em stdout , and .Em stderr for a login process. The login process is an instance of the .Xr login 1 program, invoked with the .Fl f option if authentication has succeeded. If automatic authentication fails, the user is prompted to log in as if on a standard terminal line. .Pp The parent of the login process manipulates the master side of the pseudo terminal, operating as an intermediary between the login process and the client instance of the .Xr rlogin 1 program. In normal operation, the packet protocol described in .Xr pty 4 is invoked to provide .Ql ^S/^Q type facilities and propagate interrupt signals to the remote programs. The login process propagates the client terminal's baud rate and terminal type, as found in the environment variable, .Ev TERM ; see .Xr environ 7 . The screen or window size of the terminal is requested from the client, and window size changes from the client are propagated to the pseudo terminal. .Pp Transport-level keepalive messages are enabled unless the .Fl n option is present. The use of keepalive messages allows sessions to be timed out if the client crashes or becomes unreachable. .Sh FILES .Bl -tag -width /etc/hostsxxxxxxxx -compact .It Pa /etc/hosts .It Pa /etc/hosts.equiv .It Ev $HOME Ns Pa /.rhosts .It Pa /var/run/nologin .El .Sh DIAGNOSTICS All initial diagnostic messages are indicated by a leading byte with a value of 1, after which any network connections are closed. If there are no errors before .Xr login 1 is invoked, a null byte is returned as in indication of success. .Bl -tag -width Ds .It Sy Try again. A .Xr fork 2 by the server failed. .El .Sh SEE ALSO .Xr login 1 , .Xr ruserok 3 , .Xr hosts 5 , .Xr hosts.equiv 5 , .Xr login.conf 5 , .Xr nologin 5 , .Xr services 5 , .Xr rshd 8 .Sh HISTORY The .Nm utility appeared in .Bx 4.2 . .Pp IPv6 support was added by WIDE/KAME project. .Sh BUGS The authentication procedure used here assumes the integrity of each client machine and the connecting medium. This is insecure, but is useful in an .Dq open environment. .Pp A facility to allow all data exchanges to be encrypted should be present. .Pp A more extensible protocol should be used. Index: head/libexec/rshd/rshd.8 =================================================================== --- head/libexec/rshd/rshd.8 (revision 320643) +++ head/libexec/rshd/rshd.8 (revision 320644) @@ -1,268 +1,277 @@ .\" Copyright (c) 1983, 1989, 1991, 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. 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. .\" .\" @(#)rshd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd July 3, 2017 .Dt RSHD 8 .Os .Sh NAME .Nm rshd .Nd remote shell server .Sh SYNOPSIS .Nm .Op Fl aDLln +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm utility is the server for the .Xr rcmd 3 routine and, consequently, for the .Xr rsh 1 utility. The server provides remote execution facilities with authentication based on privileged port numbers from trusted hosts. .Pp The .Nm utility listens for service requests at the port indicated in the .Dq cmd service specification; see .Xr services 5 . When a service request is received the following protocol is initiated: .Bl -enum .It The server checks the client's source port. If the port is not in the range 512-1023, the server aborts the connection. .It The server reads characters from the socket up to a .Tn NUL (`\e0') byte. The resultant string is interpreted as an .Tn ASCII number, base 10. .It If the number received in step 2 is non-zero, it is interpreted as the port number of a secondary stream to be used for the .Em stderr . A second connection is then created to the specified port on the client's machine. The source port of this second connection is also in the range 512-1023. .It The server checks the client's source address and requests the corresponding host name (see .Xr gethostbyaddr 3 , .Xr hosts 5 and .Xr named 8 ) . If the hostname cannot be determined or the hostname and address do not match after verification, the dot-notation representation of the host address is used. .It A null terminated user name of at most 16 characters is retrieved on the initial socket. This user name is interpreted as the user identity on the .Em client Ns 's machine. .It A null terminated user name of at most 16 characters is retrieved on the initial socket. This user name is interpreted as a user identity to use on the .Em server Ns 's machine. .It A null terminated command to be passed to a shell is retrieved on the initial socket. The length of the command is limited by the upper bound on the size of the system's argument list. .It The .Nm utility then validates the user using .Xr ruserok 3 , which uses the file .Pa /etc/hosts.equiv and the .Pa .rhosts file found in the user's home directory. The .Fl l option prevents .Xr ruserok 3 from doing any validation based on the user's .Pa .rhosts file, unless the user is the superuser. .It A .Tn NUL byte is returned on the initial socket and the command line is passed to the normal login shell of the user. The shell inherits the network connections established by .Nm . .El .Pp The options are as follows: .Bl -tag -width indent .It Fl a This flag is ignored, and is present for compatibility purposes. .It Fl D Sets the TCP_NODELAY socket option, which improves the performance of small back-to-back writes at the expense of additional network traffic. .It Fl L Causes all successful accesses to be logged to .Xr syslogd 8 as .Li auth.info messages. .It Fl l Do not use the user's .Pa .rhosts file for authentication, unless the user is the superuser. .It Fl n Turn off transport level keepalive messages. This will prevent sessions from timing out if the client crashes or becomes unreachable. .El .Sh FILES .Bl -tag -width /var/run/nologin -compact .It Pa /etc/hosts .It Pa /etc/hosts.equiv .It Pa /etc/login.conf .It Ev $HOME Ns Pa /.rhosts .Pp .It Pa /etc/pam.conf .Nm uses .Pa /etc/pam.conf entries with service name .Dq rsh . Authentication modules requiring passwords (such as .Nm pam_unix ) are not supported. .El .Sh DIAGNOSTICS Except for the last one listed below, all diagnostic messages are returned on the initial socket, after which any network connections are closed. An error is indicated by a leading byte with a value of 1 (0 is returned in step 10 above upon successful completion of all the steps prior to the execution of the login shell). .Bl -tag -width indent .It Sy Locuser too long. The name of the user on the client's machine is longer than 16 characters. .It Sy Ruser too long. The name of the user on the remote machine is longer than 16 characters. .It Sy Command too long. The command line passed exceeds the size of the argument list (as configured into the system). .It Sy Login incorrect. No password file entry for the user name existed or the authentication procedure described above failed. .It Sy Remote directory. The .Xr chdir 2 function to the home directory failed. .It Sy Logins not available right now. The .Xr rsh 1 utility was attempted outside the allowed hours defined in .Pa /etc/login.conf for the local user's login class. .It Sy Can't make pipe. The pipe needed for the .Em stderr , was not created. .It Sy Can't fork; try again. A .Xr fork 2 by the server failed. .It Sy : ... The user's login shell could not be started. This message is returned on the connection associated with the .Em stderr , and is not preceded by a flag byte. .El .Sh SEE ALSO .Xr rlogin 1 , .Xr rsh 1 , .Xr gethostbyaddr 3 , .Xr rcmd 3 , .Xr ruserok 3 , .Xr hosts 5 , .Xr hosts.equiv 5 , .Xr login.conf 5 , .Xr services 5 , .Xr named 8 , .Xr rlogind 8 , .Xr syslogd 8 .Sh HISTORY IPv6 support was added by WIDE/KAME project. .Sh BUGS The authentication procedure used here assumes the integrity of each client machine and the connecting medium. This is insecure, but is useful in an .Dq open environment. .Pp A facility to allow all data exchanges to be encrypted should be present. .Pp Post-PAM, .Fx also needs the following patch applied besides properly configuring .Pa .rhosts : .Bd -literal -offset indent --- etc/pam.d/rsh.orig Wed Dec 17 14:36:20 2003 +++ etc/pam.d/rsh Wed Dec 17 14:30:43 2003 @@ -9 +9 @@ -auth required pam_rhosts.so no_warn +auth required pam_rhosts.so no_warn allow_root .Ed .Pp A more extensible protocol (such as Telnet) should be used. Index: head/usr.bin/rlogin/rlogin.1 =================================================================== --- head/usr.bin/rlogin/rlogin.1 (revision 320643) +++ head/usr.bin/rlogin/rlogin.1 (revision 320644) @@ -1,158 +1,167 @@ .\" 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. 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. .\" .\" @(#)rlogin.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 26, 2003 +.Dd July 3, 2017 .Dt RLOGIN 1 .Os .Sh NAME .Nm rlogin .Nd remote login .Sh SYNOPSIS .Ar rlogin .Op Fl 468DEd .Op Fl e Ar char .Op Fl i Ar localname .Op Fl l Ar username .Ar host +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm utility starts a terminal session on a remote host .Ar host . .Pp The standard Berkeley .Pa rhosts authorization mechanism is used. .Pp The following options are available: .Bl -tag -width flag .It Fl 4 Use IPv4 addresses only. .It Fl 6 Use IPv6 addresses only. .It Fl 8 Allow an eight-bit input data path at all times; otherwise parity bits are stripped except when the remote side's stop and start characters are other than ^S/^Q. .It Fl D Set the TCP_NODELAY socket option which can improve interactive response at the expense of increased network load. .It Fl E Stop any character from being recognized as an escape character. When used with the .Fl 8 option, this provides a completely transparent connection. .It Fl d Turn on socket debugging (see .Xr setsockopt 2 ) on the TCP sockets used for communication with the remote host. .It Fl e Allow user specification of the escape character, which is .Dq ~ by default. This specification may be as a literal character, or as an octal value in the form \ennn. .It Fl i Allow the caller to specify a different local name to be used for authentication. This option is restricted to processes with uid 0. .It Fl l Specify a different .Ar username for the remote login. If this option is not specified, your local username will be used. .El .Pp A line of the form .Dq Ao escape char Ac Ns \&. disconnects from the remote host. Similarly, the line .Dq Ao escape char Ac Ns ^Z will suspend the .Nm session, and .Dq Ao escape\ char Ac Ns Ao delayed-suspend\ char Ac suspends the send portion of the .Nm session, but allows output from the remote system. By default, the tilde .Pq Dq ~ character is the escape character, and normally control-Y .Pq Dq ^Y is the delayed-suspend character. .Pp All echoing takes place at the remote site, so that (except for delays) the .Nm is transparent. Flow control via ^S/^Q and flushing of input and output on interrupts are handled properly. .Sh ENVIRONMENT The following environment variable is utilized by .Nm : .Bl -tag -width TERM .It Ev TERM Determines the user's terminal type. .El .Sh FILES .Bl -tag -width /etc/hosts -compact .It Pa /etc/hosts .It Pa /etc/hosts.equiv .It Ev $HOME Ns Pa /.rhosts .El .Sh SEE ALSO .Xr login 1 , .Xr rsh 1 , .Xr telnet 1 , .Xr setsockopt 2 , .Xr ruserok 3 , .Xr tty 4 , .Xr hosts 5 , .Xr hosts.equiv 5 , .Xr rlogind 8 , .Xr rshd 8 .Sh HISTORY The .Nm command appeared in .Bx 4.2 . .Pp IPv6 support was added by WIDE/KAME project. .Sh BUGS The .Nm utility will be replaced by .Xr telnet 1 in the near future. .Pp More of the environment should be propagated. Index: head/usr.bin/rsh/rsh.1 =================================================================== --- head/usr.bin/rsh/rsh.1 (revision 320643) +++ head/usr.bin/rsh/rsh.1 (revision 320644) @@ -1,172 +1,181 @@ .\" 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. 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 .\" $FreeBSD$ .\" -.Dd October 16, 2002 +.Dd July 3, 2017 .Dt RSH 1 .Os .Sh NAME .Nm rsh .Nd remote shell .Sh SYNOPSIS .Nm .Op Fl 46dn .Op Fl l Ar username .Op Fl t Ar timeout .Ar host .Op command +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm utility executes .Ar command on .Ar host . .Pp The .Nm utility copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit and terminate signals are propagated to the remote command; .Nm normally terminates when the remote command does. The options are as follows: .Bl -tag -width flag .It Fl 4 Use IPv4 addresses only. .It Fl 6 Use IPv6 addresses only. .It Fl d Turn on socket debugging (using .Xr setsockopt 2 ) on the .Tn TCP sockets used for communication with the remote host. .It Fl l Ar username Allow the remote .Ar username to be specified. By default, the remote username is the same as the local username. Authorization is determined as in .Xr rlogin 1 . .It Fl n Redirect input from the special device .Pa /dev/null (see the .Sx BUGS section of this manual page). .It Fl t Ar timeout Allow a .Ar timeout to be specified (in seconds). If no data is sent or received in this time, .Nm will exit. .El .Pp If no .Ar command is specified, you will be logged in on the remote host using .Xr rlogin 1 . .Pp Shell metacharacters which are not quoted are interpreted on local machine, while quoted metacharacters are interpreted on the remote machine. For example, the command .Pp .Dl rsh otherhost cat remotefile >> localfile .Pp appends the remote file .Ar remotefile to the local file .Ar localfile , while .Pp .Dl rsh otherhost cat remotefile \&">>\&" other_remotefile .Pp appends .Ar remotefile to .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 FILES .Bl -tag -width /etc/hosts -compact .It Pa /etc/hosts .El .Sh SEE ALSO .Xr rlogin 1 , .Xr setsockopt 2 , .Xr rcmd 3 , .Xr ruserok 3 , .Xr hosts 5 , .Xr hosts.equiv 5 , .Xr rlogind 8 , .Xr rshd 8 .Sh HISTORY The .Nm command appeared in .Bx 4.2 . .Sh BUGS If you are using .Xr csh 1 and put a .Nm in the background without redirecting its input away from the terminal, it will block even if no reads are posted by the remote command. If no input is desired you should redirect the input of .Nm to .Pa /dev/null using the .Fl n option. .Pp You cannot run an interactive command (like .Xr ee 1 or .Xr vi 1 ) using .Nm ; use .Xr rlogin 1 instead. .Pp Stop signals stop the local .Nm process only; this is arguably wrong, but currently hard to fix for reasons too complicated to explain here. Index: head/usr.bin/ruptime/ruptime.1 =================================================================== --- head/usr.bin/ruptime/ruptime.1 (revision 320643) +++ head/usr.bin/ruptime/ruptime.1 (revision 320644) @@ -1,90 +1,99 @@ .\" Copyright (c) 1983, 1990, 1993, 1994 .\" 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. 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. .\" .\" @(#)ruptime.1 8.2 (Berkeley) 4/5/94 .\" $FreeBSD$ .\" -.Dd March 1, 2003 +.Dd July 3, 2017 .Dt RUPTIME 1 .Os .Sh NAME .Nm ruptime .Nd show host status of local machines .Sh SYNOPSIS .Nm .Op Fl alrtu .Op Ar host ... +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm utility gives a status line like .Xr uptime 1 for each machine on the local network; these are formed from packets broadcast by each host on the network once every three minutes. .Pp If no operands are given, .Nm displays uptime status for all machines; otherwise only those hosts specified on the command line are displayed. If hosts are specified on the command line, the sort order is equivalent to the order hosts were specified on the command line. .Pp Machines for which no status report has been received for 11 minutes are shown as being down, and machines for which no status report has been received for 4 days are not shown in the list at all. .Pp The options are as follows: .Bl -tag -width Ds .It Fl a Include all users. By default, if a user has not typed to the system for an hour or more, then the user will be omitted from the output. .It Fl l Sort by load average. .It Fl r Reverse the sort order. .It Fl t Sort by uptime. .It Fl u Sort by number of users. .El .Pp The default listing is sorted by host name. .Sh FILES .Bl -tag -width /var/rwho/whod.* -compact .It Pa /var/rwho/whod.* data files .El .Sh SEE ALSO .Xr rwho 1 , .Xr uptime 1 , .Xr rwhod 8 .Sh HISTORY A .Nm utility appeared in .Bx 4.2 . Index: head/usr.bin/rwho/rwho.1 =================================================================== --- head/usr.bin/rwho/rwho.1 (revision 320643) +++ head/usr.bin/rwho/rwho.1 (revision 320644) @@ -1,80 +1,89 @@ .\" 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. 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. .\" .\" @(#)rwho.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd July 3, 2017 .Dt RWHO 1 .Os .Sh NAME .Nm rwho .Nd who is logged in on local machines .Sh SYNOPSIS .Nm .Op Fl a +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm command produces output similar to .Xr who 1 , but for all machines on the local network. If no report has been received from a machine for 11 minutes then .Nm assumes the machine is down, and does not report users last known to be logged into that machine. .Pp If a user has not typed to the system for a minute or more, then .Nm reports this idle time. .Pp The following option is available: .Bl -tag -width indent .It Fl a Include all users. By default, if a user has not typed to the system for an hour or more, then the user will be omitted from the output. .El .Sh FILES .Bl -tag -width /var/rwho/whod.* -compact .It Pa /var/rwho/whod.* information about other machines .El .Sh SEE ALSO .Xr ruptime 1 , .Xr who 1 , .Xr rwhod 8 .Sh HISTORY The .Nm command appeared in .Bx 4.3 . .Sh BUGS This is unwieldy when the number of machines on the local net is large. Index: head/usr.sbin/rwhod/rwhod.8 =================================================================== --- head/usr.sbin/rwhod/rwhod.8 (revision 320643) +++ head/usr.sbin/rwhod/rwhod.8 (revision 320644) @@ -1,239 +1,248 @@ .\" Copyright (c) 1983, 1991, 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. 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. .\" .\" @(#)rwhod.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd January 21, 2010 +.Dd July 3, 2017 .Dt RWHOD 8 .Os .Sh NAME .Nm rwhod .Nd system status server .Sh SYNOPSIS .Nm .Op Fl i .Op Fl p .Op Fl l .Op Fl m Op Ar ttl +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will be removed from future versions of the +.Fx +base system. +If +.Nm +is still required, it can be installed from ports or packages +(net/bsdrcmds). .Sh DESCRIPTION The .Nm utility is the server which maintains the database used by the .Xr rwho 1 and .Xr ruptime 1 programs. Its operation is predicated on the ability to .Em broadcast or .Em multicast messages on a network. .Pp The .Nm utility operates as both a producer and consumer of status information, unless the .Fl l (listen mode) option is specified, in which case it acts as a consumer only. As a producer of information it periodically queries the state of the system and constructs status messages which are broadcasted or multicasted on a network. As a consumer of information, it listens for other .Nm servers' status messages, validating them, then recording them in a collection of files located in the directory .Pa /var/rwho . .Pp The following options are available: .Bl -tag -width indent .It Fl i Enable insecure mode, which causes .Nm to ignore the source port on incoming packets. .It Fl p Ignore all .Dv POINTOPOINT interfaces. This is useful if you do not wish to keep dial on demand interfaces permanently active. .It Fl l Enable listen mode, which causes .Nm to not broadcast any information. This allows you to monitor other machines' .Nm information, without broadcasting your own. .It Fl m Op Ar ttl Cause .Nm to use IP multicast (instead of broadcast) on all interfaces that have the IFF_MULTICAST flag set in their "ifnet" structs (excluding the loopback interface). The multicast reports are sent with a time-to-live of 1, to prevent forwarding beyond the directly-connected subnet(s). .Pp If the optional .Ar ttl argument is supplied with the .Fl m flag, .Nm will send IP multicast datagrams with a time-to-live of .Ar ttl , via a SINGLE interface rather than all interfaces. .Ar ttl must be between 0 and 32 (or MAX_MULTICAST_SCOPE). Note that .Fl m Ar 1 is different from .Fl m , in that .Fl m Ar 1 specifies transmission on one interface only. .Pp When .Fl m is used without a .Ar ttl argument, the program accepts multicast .Nm reports from all multicast-capable interfaces. If a .Ar ttl argument is given, it accepts multicast reports from only one interface, the one on which reports are sent (which may be controlled via the host's routing table). Regardless of the .Fl m option, the program accepts broadcast or unicast reports from all interfaces. Thus, this program will hear the reports of old, non-multicasting .Nm Ns s , but, if multicasting is used, those old .Nm Ns s will not hear the reports generated by this program. .El .Pp The server transmits and receives messages at the port indicated in the ``who'' service specification; see .Xr services 5 . The messages sent and received, are of the form: .Bd -literal -offset indent struct outmp { char out_line[8]; /* tty name */ char out_name[8]; /* user id */ long out_time; /* time on */ }; struct whod { char wd_vers; char wd_type; char wd_fill[2]; int wd_sendtime; int wd_recvtime; char wd_hostname[32]; int wd_loadav[3]; int wd_boottime; struct whoent { struct outmp we_utmp; int we_idle; } wd_we[1024 / sizeof (struct whoent)]; }; .Ed .Pp All fields are converted to network byte order prior to transmission. The load averages are as calculated by the .Xr w 1 program, and represent load averages over the 5, 10, and 15 minute intervals prior to a server's transmission; they are multiplied by 100 for representation in an integer. The host name included is that returned by the .Xr gethostname 3 system call, with any trailing domain name omitted. The array at the end of the message contains information about the users logged in to the sending machine. This information includes the contents of the entry from the user accounting database for each non-idle terminal line and a value indicating the time in seconds since a character was last received on the terminal line. .Pp Messages received by the .Nm rwho server are discarded unless they originated at an .Nm rwho server's port or the .Fl i option was specified. In addition, if the host's name, as specified in the message, contains any unprintable .Tn ASCII characters, the message is discarded. Valid messages received by .Nm are placed in files named .Pa whod.hostname in the directory .Pa /var/rwho . These files contain only the most recent message, in the format described above. .Pp Status messages are generated approximately once every 3 minutes. The .Nm utility performs an .Xr nlist 3 on .Pa /boot/kernel/kernel every 30 minutes to guard against the possibility that this file is not the system image currently operating. .Sh SEE ALSO .Xr ruptime 1 , .Xr rwho 1 .Sh HISTORY The .Nm utility appeared in .Bx 4.2 . .Sh BUGS Status information should be sent only upon request rather than continuously. People often interpret the server dying or network communication failures as a machine going down.