Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Latest commit

 

History

History
196 lines (148 loc) · 7.58 KB

rsh_config.5.ronn

File metadata and controls

196 lines (148 loc) · 7.58 KB

rsh_config(5) -- rsh configuration

SYNOPSIS

~/.rsh/config
/etc/rsh/rsh_config

DESCRIPTION

rsh(1) obtains configuration data from the following sources in the following order:

  1. command-line options
  2. user's configuration file (~/.rsh/config)
  3. system-wide configuration file (/etc/rsh/rsh_config)

For each parameter, the first obtained value will be used. The configuration files contain sections separated by Host specifications, and that section is only applied for hosts that match one of the patterns given in the specification. The matched host name is the complete protocol://user@host:port/env/stack/service line given on the command line.

Since the first obtained value for each parameter is used, more host-specific declarations should be given near the beginning of the file, and general defaults at the end.

The file contains keyword-argument pairs, one per line. Lines starting with '#' and empty lines are interpreted as comments. Arguments may optionally be enclosed in double quotes (") in order to represent arguments containing spaces. Configuration options may be separated by whitespace or optional whitespace and exactly one '='; the latter format is useful to avoid the need to quote whitespace when specifying configuration options using -o.

The possible keywords and their meanings are as follows (note that keywords are case-insensitive and arguments are case-sensitive):

  • Host: Restricts the following declarations (up to the next Host keyword) to be only for those hosts that match one of the patterns given after the keyword. If more than one pattern is provided, they should be separated by whitespace. A single '*' as a pattern can be used to provide global defaults for all hosts. The host is the complete protocol://user@host:port/env/stack/service line given on the command line.

    A pattern entry may be negated by prefixing it with an exclamation mark ('!'). If a negated entry is matched, then the Host entry is ignored, regardless of whether any other patterns on the line match. Negated matches are therefore useful to provide exceptions for wildcard matches.

    See PATTERNS for more information on patterns.

  • Container: Specifies how to choose the container to log in to. The argument may be one of first (use the first executable container), menu (display a menu of the available containers), or auto (display a menu only when there is more than one container and a TTY is requested). The default is first.

  • Environment: Specifies the Rancher environment of the container to log in to. Arguments to Environment accept the tokens described in the TOKENS section. The default is the name given on the command line.

  • EscapeChar: Sets the escape character (default: '~'). The escape character can also be set on the command line. The argument should be a single character, or none to disable the escape character entirely (making the connection transparent for binary data).

  • HostName: Specifies the real host name to log into. This can be used to specify nicknames or abbreviations for hosts. Arguments to HostName accept the tokens described in the TOKENS section. Numeric IP addresses are also permitted (both on the command line and in HostName specifications). The default is the name given on the command line.

  • LogLevel: Gives the verbosity level that is used when logging messages from rsh(1). The possible values are: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of verbose output.

  • Port: Specifies the port number to connect on the remote host. The default is 80 if the protocol is http, or 443 if the protocol is https.

  • Protocol: Specifies the protocol used to connect on the remote host. The argument may be one of http or https. The default is https.

  • RemoteCommand: Specifies the command to execute on the remote host instead of a login shell. Arguments to RemoteCommand accept the tokens described in the TOKENS section. This can also be specified with the final argument on the command line.

  • RequestTTY: Specifies whether to request a pseudo-tty for the session. The argument may be one of: no (never request a TTY), yes (always request a TTY when standard input is a TTY), force (always request a TTY) or auto (request a TTY when opening a login session). This option mirrors the -t and -T flags for rsh(1).

  • SendEnv: Specifies what variables from the local environ(7) should be sent to the server. Note that the TERM environment variable is always sent whenever a pseudo-terminal is requested as it is required by the protocol. Variables are specified by name, which may contain wildcard characters. Multiple environment variables may be separated by whitespace or spread across multiple SendEnv directives. The default is not to send any environment variables.

    See PATTERNS for more information on patterns.

  • Service: Specifies the Rancher service of the container to log in to. Arguments to Service accept the tokens described in the TOKENS section. The default is the name given on the command line.

  • Stack: Specifies the Rancher stack of the container to log in to. Arguments to Stack accept the tokens described in the TOKENS section. The default is the name given on the command line.

  • User: Specifies the user to log in as. This can be useful when a different user name is used on different containers. This saves the trouble of having to remember to give the user name on the command line.

PATTERNS

A pattern consists of zero or more non-whitespace characters, '*' (a wildcard that matches zero or more characters), or '?' (a wildcard that matches exactly one character). For example, to specify a set of declarations for any host in the ".co.uk" set of domains, the following pattern could be used:

Host *.co.uk/*

The following pattern would match any host in the 192.168.0.[0-9] network range:

Host *192.168.0.?/*

A pattern-list is a comma-separated list of patterns. Patterns within pattern-lists may be negated by preceding them with an exclamation mark ('!'). For example, to match all hosts except production the following entry could be used:

Host !*prod.example.com/*,*.example.com/*

TOKENS

Arguments to some keywords can make use of tokens, which are expanded at runtime:

      %%    A literal '%'.
      %e    The remote environment.
      %h    The remote hostname.
      %r    The remote username.
      %S    The remote stack.
      %s    The remote service.
  • Environment: accepts the tokens %%, %e, $S, and %s.

  • HostName: accepts the tokens %%, and %h.

  • RemoteCommand: accepts the tokens %%, and %r.

  • Stack: accepts the tokens %%, %e, $S, and %s.

  • Service: accepts the tokens %%, %e, $S, and %s.

FILES

  • ~/.rsh/config: This is the per-user configuration file. The file format and configuration options are described above.

  • /etc/rsh/rsh_config: Systemwide configuration file. The file format and configuration options are described above.

AUTHORS

avvoenv is heavily inspired by OpenSSH, and portions of the man page have been directly copied. It is written and maintained by the Avvo Infrastructure Team [email protected].

SEE ALSO

rsh(1)