Ahojte kolegovia, potreboval by som "postuchnut" pri konfiguratcii (ssh + sftp), sshd(OpenSSH)
Moja vizia je taka, ze ku serveru mozem pristupit cez SSH a mat dostupne /bin, /usr/bin a SFTP je "locknute" do "/home/test"
Majme:
$ adduser -d /home/test test
$ mkdir -p /home/test/home/test
$ chown root:wheel /home/test
$ chmod 755 /home/test
sshd_config:
Port 22
AddressFamily inet
ListenAddress 0.0.0.0
UsePAM yes
UseDNS no
Subsystem sftp internal-sftp
AllowUsers test
Match User test
X11Forwarding no
AllowTcpForwarding no
PasswordAuthentication yes
ChrootDirectory /home/%u
Konfig vyssie pochopitelne chrootne (lockne) SFTP do zlozky /home/test, ale sposobi ze "/bin" a "/usr/bin" niesu pristupne a teda
$ ssh test@moja_ip
/bin/sh: No such file or directory
Connection to moja_ip closed.
Otazka: Je nieco "vhodnejsie" ako nasledujuci sposob?
$ mount -o bind,ro /dev/bin /home/test/bin