Hello all,
I'm having issues logging in a chroot environment and I can't seem to figure it out. I've got the chroot environment set up correctly and logging in works as expected. However, I'm only receiving log messages for sshd and not the internal-sftp subsystem. I've read the man pages on syslogd(8) and it specifies that it has to have a /dev/log socket set up in the chroot folder. So here is what I've done.
After I did this, I restarted all necessary services (sshd, syslogd) but when I
I'm still able to successfully connect to the server but when I look at auth.log it is just logging the sshd subsytem and not the internal-sftp subsystem. Any hints or suggestions from the community? I feel like I'm missing something very simple. Thanks in advance! FreeBSD is awesome!
I'm having issues logging in a chroot environment and I can't seem to figure it out. I've got the chroot environment set up correctly and logging in works as expected. However, I'm only receiving log messages for sshd and not the internal-sftp subsystem. I've read the man pages on syslogd(8) and it specifies that it has to have a /dev/log socket set up in the chroot folder. So here is what I've done.
Code:
Match Group group1
PasswordAuthentication yes
ChrootDirectory /sftp/chroot
ForceCommand internal-sftp
AllowTcpForwarding no
AllowAgentForwarding no
PermitTunnel no
PermitTTY no
X11Forwarding no
Code:
root@ftp:/ #mkdir /sftp/chroot/dev
root@ftp:/ #chmod 755 /sftp/chroot/dev
root@ftp:/ #touch /sftp/chroot/dev/log
Code:
root@ftp:/ # vi /etc/rc.conf
syslogd_flags="-s -l /sftp/chroot/dev/log"
After I did this, I restarted all necessary services (sshd, syslogd) but when I
cat /sftp/chroot/dev/log
, I'm presented with this error message.
Code:
root@ftp:/ # cat /sftp/chroot/dev/log
cat: /sftp/chroot/dev/log: Protocol wrong type for socket
I'm still able to successfully connect to the server but when I look at auth.log it is just logging the sshd subsytem and not the internal-sftp subsystem. Any hints or suggestions from the community? I feel like I'm missing something very simple. Thanks in advance! FreeBSD is awesome!