Información a Considerar #1

CHROOT: Para limitar a los usuarios vía ssh a trabajar sobre sus /home/%u únicamente.

In /etc/ssh/sshd_config :

You need to configure OpenSSH to use its internal SFTP subsystem.

Subsystem sftp internal-sftp

Then, I configured chroot()ing in a match rule.

Match group sftponly
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

The directory in which to chroot() must be owned by root. After the call to chroot(), sshd changes directory to the home directory relative to the new root directory. That is why I use / as home directory.

# chown root.root /home/user
# usermod -d / user
# adduser user sftponly

This seems to work as expected :

$ sftp user@host
Connecting to host...
user@host's password:
sftp> ls
build cowbuildinall incoming johnbuilderclean
sftp> pwd
Remote working directory: /
sftp> cd ..
sftp> ls
build cowbuildinall incoming johnbuilderclean

Comentarios

Entradas populares de este blog

Configuración de Squid.

"Excelente" Seguridad de Windows O.S.

VirtualBox - BRIDGED INTERFACE