table of contents
RSSH.CONF(5) | Derek D. Martin | RSSH.CONF(5) |
NAME¶
/etc/rssh.conf - configuration file for rssh
OVERVIEW¶
rssh.conf is the configuration file for rssh. It allows the system administrator to control the behavior of the shell. Configuration keywords are either used by themselves on a line, or followed by an equal sign ('=') and a configuration value. Comments start with a hash ('#') and can occur anywhere on the line. Configuration options are case insensitive. Spaces at the beginning or end of line, or between the equal sign and the configuration keywords or values are ignored. If the value of a configuration option contains spaces, it (or at least the space) must be enclosed in either single or double quotes.
A default configuration file is provided with the source distribution of rssh. If the configuration file is missing or contains errors, ssh will lock out all users. If a config file is present, the default is to lock out users if no services have been explicitly allowed.
New in v2.1 is the ability to configure options on a per-user basis, using the user keyword. More details are below.
CONFIGURATION KEYWORDS¶
allowscp
allowsftp
allowcvs
allowrdist
allowrsync
allowsvnserve
umask
logfacility
logfacility=user
logfacility=LOG_USER
are equivalent, and tell rssh to use the user facility for logging to syslog.
chrootpath
chrootpath=/usr/chroot
will change the root of the virtual file system to /usr/chroot, preventing the user from being able to access anything below /usr/chroot in the file system, and making /usr/chroot appear to be the root directory. Care must be taken to set up a proper chroot jail; see the file CHROOT in the rssh source distribution for hints about how to do this. See also the chroot(2) man page.
If the user's home directory (as specified in /etc/passwd) is underneath the path specified by this keyword, then the user will be chdir'd into their home directory. If it is not, then they will be chdir'd to the root of the chroot jail.
In other words, if the jail is /chroot, and your user's home directory is /chroot/home/user, then once rssh_chroot_helper changes the root of the system, it will cd into /home/user inside the jail. However, if your user's home directory is given as /home/user in /etc/passwd, then even if that directory exists in the jail, the chroot helper will not try to cd there. The user's normal home directory must live inside the jail for this to work.
user
username
For example, you might have something like this:
user = luser:022:000010:
This does the following: for the user with the username "luser", set the umask to 022, disallow sftp, and allow scp. Because there is no chroot path specified, the user will not be chrooted, regardless of default options set with the keywords above. If you wanted this user to be chrooted, you would need to specify the chroot path explicitly, even if it should be the same as that set using the chrootpath keyword. Remember that if there are spaces in the path, you need to quote it, something like this:
user = "luser:022:000010:/usr/local/chroot dir"
See the default rssh.conf file for more examples.
SEE ALSO¶
rssh(1), sshd(8), ssh(1), scp(1), sftp(1), svnserve(8), syslogd.conf(5), chroot(2).
7 Jul 2003 | man pages |