Hi There,
I am trying to create a
I didn't found useful info on the handbook therefore I followed this guide:
www.micski.dk
However I couldn't establish a connection...
This is the only part that has been changed of my
I also tried to modify this line:
And I always got this error:
In this FreeNAS forum suggested to change
And it setup
I haven't tested it yet, but I'll give this setup a try...
Meanwhile any help is really appreciated, thanks! ?
I am trying to create a
git
user to access on its git /home
only through sftp
.I didn't found useful info on the handbook therefore I followed this guide:

SFTP server with OpenSSH on FreeBSD.
Setup an SFTP server with OpenSSH on FreeBSD. SFTP can be used for sharing and exchanging files with clients and users.

However I couldn't establish a connection...
- User is part of a group called "sftp"
- Public has been updated
- sshd_config has been updated
- sshd service restarted multiple time
Code:
# id git
uid=1003(git) gid=1003(git) groups=1003(git),1004(sftp)
This is the only part that has been changed of my
sshd_config
:
Code:
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
PermitRootLogin no
PasswordAuthentication no
#AuthenticationMethods publickey
AllowUsers freezr
# Change starts here
# sftp setup
Match Group sftp
ChrootDirectory /usr/home/%u/
ForceCommand internal-sftp
I also tried to modify this line:
Code:
AllowUsers freezr git
And I always got this error:
Code:
sftp git@vultrgit 23:46
Connection to 216.155.135.237 closed by remote host.
Connection closed
In this FreeNAS forum suggested to change
nologin shell
for scponly shell
because:Shell is set as/usr/local/bin/scponly
Initially I tried setting the shell as/usr/sbin/nologin
, but this was just creating errors upon connection.
And it setup
sshd_config
this way:
Code:
freenas# nano /etc/ssh/sshd_config
[...]
#Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp internal-sftp
Match Group sftponly
ChrootDirectory /mnt/vol1/cloud-storage/chroot
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
I haven't tested it yet, but I'll give this setup a try...
Meanwhile any help is really appreciated, thanks! ?