I am trying to figure out how to correctly chroot a user directory any thoughts? I see you can do it with ftp however I would like to do it via ssh…
Here is what I thought i figured out so far…
nano /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
X11DisplayOffset 10
X11Forwarding no
ClientAliveInterval 60
ClientAliveCountMax 3
PrintMotd yes
SyslogFacility AUTH
LogLevel INFO
Match User NAME
ChrootDirectory /var/lib/nethserver/home/NAME
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
I also tried this… chroot 700 /var/lib/nethserver/home/NAME
I have also tried this…
Subsystem sftp /usr/libexec/openssh/sftp-server
X11DisplayOffset 10
X11Forwarding no
ClientAliveInterval 60
ClientAliveCountMax 3
PrintMotd yes
SyslogFacility AUTH
LogLevel INFO
Match User NAME
ChrootDirectory /var/lib/nethserver/home/NAME
AllowTCPForwarding no
X11Forwarding no
ForceCommand /usr/libexec/openssh/sftp-server
I have to use Neth Sever 6.8 because Neth 7 is very broken it won’t even allow me to set my ip address and customized gateways… So unfortunately the documentation you sent probably won’t help me until we get neth 7 fixed…
Yea I am looking at it and playing with commands example command db accounts show NAME
It brings up a list of information but after playing with db -h it doesn’t seem to explain exactly what commands can be given… Is their any direct documentation on commands? Like example commands of what each command does?
Honestly after 6 hrs of messing around with this not to mention the 4 hrs before i posted this mess… I have officially given up on this and will just create a seperate VM server for users to log in and chroot them to their prospective folders… Thanks again… ~ Loren
NethServer 6 and 7 are almost identical regarding network configuration. The only difference it’s that in 7 we no longer store the MAC address of the board. But this change can’t break things.
Would you like to help us to solve the problem you have with network in 7?
I might have missed a few steps then…
My memory is not the best on some of this stuff been awhile since i have had to put some thing together like this…