WRAPRSH(1) WRAPRSH(1) NAME wraprsh - remote-shell wrapper for cvs, svn, rsync, etc. DESCRIPTION Some client software on UNIX delived systems can establish a connection with a server using a remote shell command behalf of TCP socket. CVS, populer version control system, is one of those software. It uses the rsh command by default, but you can specify other shell such as ssh by setting the CVS_RSH environment variable. Accessing with remote shell is convenient, but you may be irritated if you often access two servers and remote shell access ways to those servers are different. Each time you switch CVS server, you have to set the CVS_RSH environment variable or something. wraprsh solves the problem. It is a wrapper for remote shell. It exe- cutes actual shell command according with a configuration file. CONFIGURATION FILE wraprsh reads a configuration file to determine the actual to be exe- cuted. By default the file is .wraprsh in your home directory, but you may set the WRAPRSH_CONFIG_FILE environment variable to specify another file. In the configuration file, empty lines and lines beginning with `#' are ignored. Any other lines must be the following form: command user host remote-shell The first three arguments, command, user and host, are expressions to select actual remote shell. If the three expressions matches for remote shell execution request, wraprsh chooses the last argument, remote-shell, as the actual remote shell. command is command name executed on a remote host by a remote shell, such as cvs. Since wraprsh accepts only filename portion of command path, /usr/bin/cvs is not acceptable. user is remote user name. If -l user option or user@host argument is given to wraprsh, wraprsh recognizes it as the remote user name. Oth- erwise, user is the same as the local user name. host is remote host, given to wraprsh as a command line argument. In command, user and host, `*' (asterisk) matches any sequences of 0 or more characters. `\' (backslash) prior to `*' prevents it. `*' in this case is evaluated literally. The last argument, remote-shell, is actual remote shell command and its arguments executed by wraprsh. In command, there are some special notaions: %u This is replaced by the remote user name at command execution. %h This is replaced by the remote host at command execution. "...." Double quotation marks prevent wraprsh from splitting the phrase into multiple arguments. The quotation marks themsevels are deleted at execution. '....' This is like "....", but %u and %h in it are not replaced. \c Backslash is escape cahracter. It preserves the literal value of the next character. Unlike UNIX shell, it cannot escape new- line. Since non-option arguments given to wraprsh are appended to command automatically, you must not specify them in a configuration file. If multiple lines in the file are matched, the line nearest to the beginning of the file is chosen. If no line is matched, wraprsh out- puts error message and exits. EXAMPLE Suppose that your configuration file is: cvs * cvs.example.org ssh -l adam %h * * * ssh %h Now, the command line given to wraprsh is: wraprsh cvs.example.org cvs server Then wraprsh executes the following command. ssh -l adam cvs.example.org cvs server CLIENT SOFTWARE As far as the author of wraprsh knows, it works with CVS, Subversion and rsync. To access CVS server with wraprsh, set the CVS_RSH environment variable to /usr/private/libexec/wraprsh. To access Subversion server with wraprsh, set the SVN_SSH environment variable to /usr/private/libexec/wraprsh, or edit the configuration file for Subversion (usually ~/.subversion/config). To access rsync server with wraprsh, set the RSYNC_RSH environment variable to /usr/private/libexec/wraprsh, or specify --rsh=/usr/pri- vate/libexec/wraprsh option of rsync. LOG LEVEL The WRAPRSH_LOG_LEVEL environment variable is used to set log level of wraprsh. If the variable is set to quiet, wraprsh outputs no message even an error occurs. If set to normal, it outputs error and warning messages. If set to verbose, it also outputs some informative mes- sages. The default is normal. SEE ALSO cvs(1), rsh(1), ssh(1) WRAPRSH(1)