Disallow user login

_$: usermod -L usuario    # Disallows the login with password

Disallow user login with password

root@gitserver: passwd -l <user>

Note: This does not disallow the account. The user would still be able to login using an SSH key.

Disallow root login

# Authentication:
LoginGraceTime 120
PermitRootLogin no      <===
StrictModes yes

SFTP access but no SSH access

_$: apt-get isntall rssh
_$: chsh -s /usr/bin/rssh <usuario>