This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



RCMDSH(3)                               BSD Library Functions Manual                               RCMDSH(3)

NAME
     rcmdsh -- return a stream to a remote command without superuser

SYNOPSIS
     #include <unistd.h>

     int
     rcmdsh(char **ahost, int inport, const char *locuser, const char *remuser, const char *cmd,
         const char *rshprog);

DESCRIPTION
     The rcmdsh() function is used by normal users to execute a command on a remote machine using an authen-tication authentication
     tication scheme based on reserved port numbers using rshd(8) or the value of rshprog (if non-NULL).

     The rcmdsh() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does
     not exist.  Otherwise *ahost is set to the standard name of the host and a connection is established to
     a server residing at the well-known Internet port ``shell/tcp'' (or whatever port is used by rshprog).
     The parameter inport is ignored; it is only included to provide an interface similar to rcmd(3).

     If the connection succeeds, a socket in the UNIX domain of type SOCK_STREAM is returned to the caller,
     and given to the remote command as stdin, stdout, and stderr.

RETURN VALUES
     The rcmdsh() function returns a valid socket descriptor on success.  Otherwise, -1 is returned and a
     diagnostic message is printed on the standard error.

SEE ALSO
     rsh(1), socketpair(2), rcmd(3), rshd(8)

BUGS
     If rsh(1) encounters an error, a file descriptor is still returned instead of -1.

HISTORY
     The rcmdsh() function first appeared in OpenBSD 2.0, and made its way into FreeBSD 5.0.

BSD                                           September 1, 1996                                          BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...