Technical Notes |
|
This technical note describes how to set up the UNIX feature, chroot, to disable a user's UNIX shell and allow SFTP access only in either the Reflection or F-Secure SSH UNIX Server.
Note: Beginning with version 6.0, the F-Secure SSH product line has a new name, "Reflection for Secure IT."
Use chroot to change your system's root directory (/) for a specified process, such as the Reflection or F-Secure SSH UNIX Server. See your UNIX host documentation or man pages for more information.
To set up chroot, you must make the following modifications to the sshd2_config file. By default, this file is located in the /etc/ssh2 directory.
The steps and examples vary depending on your version.
Reflection supports chroot by user and group names, and with the internal sftp server only. Uncomment the relevant lines under the Chrooted environment section heading and add your user(s) to the list.
In this example for setting up chroot by user, the user is named jailuser:
## Chrooted environmentChrootSftpUsers = jailuserSubsystem-sftp = internal://sftp-serverIn this example for setting up chroot by group, the group is named wheel:
## Chrooted environmentChrootSftpGroups = wheelSubsystem-sftp = internal://sftp-serverNote the following:
ChrootSftpUsers = admin.*ChrootSftpGroups = .*dev.*cat /var/run/sshd2_22.pid6611kill -9 6611/opt/ssh2/sbin/sshd2If you are unable to locate the sshd2 file, use the UNIX find command.
## Chrooted environmentChRootUsers anonymous,ftp,guest,jailuserjailuser:x:1003:1::/export/home/jailuser:/opt/ssh2/bin/ssh-dummy-shellThe dummy shell file is often located in the /opt/ssh2/bin or /usr/bin directory. If you are unable to locate the ssh-dummy-shell file, use the UNIX find command.
Note: This is not supported in version 7.0 or higher.
cat /var/run/sshd2_22.pid6611kill -9 6611/opt/ssh2/sbin/sshd2If you are unable to locate the sshd2 file, use the UNIX find command.