'\" te .\" Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. .TH on 1 "7 May 2012" "SunOS 5.11" "User Commands" .SH NAME on \- execute a command on a remote system with the local environment .SH SYNOPSIS .LP .nf \fBon\fR [\fB-i\fR] [\fB-d\fR] [\fB-n\fR] \fIhost\fR \fIcommand\fR [\fIargument\fR] ... .fi .SH DESCRIPTION .sp .LP The \fBon\fR program is used to execute commands on another system, in an environment similar to that invoking the program. All environment variables are passed and the current working directory is preserved. To preserve the working directory, the working file system must be either already mounted on the host or be exported to it. Relative path names will only work if they are within the current file system. Absolute path names may cause problems. .sp .LP The standard input is connected to the standard input of the remote command. The standard output and the standard error from the remote command are sent to the corresponding files for the \fBon\fR command. .sp .LP Note that the \fBon\fR program requires that the \fBrpc.rexd\fR(1M) service be running on the remote machine. By default, \fBrpc.rexd\fR is present but not running on an Oracle Solaris system. Because of its better security, \fBssh\fR(1) is the preferred method of invoking commands on remote machines. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-d\fR\fR .ad .RS 6n .rt Debug mode. Prints out some messages as work is being done. .RE .sp .ne 2 .mk .na \fB\fB-i\fR\fR .ad .RS 6n .rt Interactive mode. Uses remote echoing and special character processing. This option is needed for programs that expect to be talking to a terminal. All terminal modes and window size changes are propagated. .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .RS 6n .rt No Input. This option causes the remote program to get EOF when it reads from the standard input, instead of passing the standard input from the standard input of the \fBon\fR program. For example, \fB-n\fR is necessary when running commands in the background with job control. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/file-system/nfs .TE .SH SEE ALSO .sp .LP \fBchkey\fR(1), \fBrlogin\fR(1), \fBrsh\fR(1), \fBssh\fR(1), \fBtelnet\fR(1), \fBrpc.rexd\fR(1M), \fBattributes\fR(5) .SH DIAGNOSTICS .sp .ne 2 .mk .na \fB\fBunknown host\fR\fR .ad .sp .6 .RS 4n Host name not found. .RE .sp .ne 2 .mk .na \fB\fBcannot connect to server\fR\fR .ad .sp .6 .RS 4n Host down or not running the server. .RE .sp .ne 2 .mk .na \fB\fBcan't find\fR\fR .ad .sp .6 .RS 4n Problem finding the working directory. .RE .sp .ne 2 .mk .na \fB\fBcan't locate mount point\fR\fR .ad .sp .6 .RS 4n Problem finding current file system. .RE .sp .ne 2 .mk .na \fB\fBRPC: Authentication error\fR\fR .ad .sp .6 .RS 4n The server requires \fBDES\fR authentication and you do not have a secret key registered with keyserv. Perhaps you logged in without a password. Try to keylogin. If that fails, try to set your publickey with chkey. .RE .sp .ne 2 .mk .na \fB\fBon \fIserver\fR: RPC: can't encode arguments\fR\fR .ad .sp .6 .RS 4n The \fB10240\fR byte limit for arguments to be encoded and passed from the sending to the receiving system has been exceeded. .RE .sp .LP Other diagnostic messages may be passed back from the server. .SH BUGS .sp .LP When the working directory is remote mounted over \fBNFS\fR, a Control-Z hangs the window. .sp .LP Root cannot use \fBon\fR.