Deny SSH but allow SFTP
Hi all,
We deny ssh access to our server but we want to allow SFTP, as far as I know SFTP uses the same port 22 like SSH, how to deny the SSH but allow the SFTP? |
searching for "allow sftp but not ssh" yields many helpful links. Please review some of those and come back if you have any questions.
|
I followed the instruction on: https://www.server-world.info/en/not...ux_9&p=ssh&f=5
/etc/ssh/sshd_config Subsystem sftp internal-sftp Match Group sftp_users X11Forwarding no AllowTcpForwarding no ChrootDirectory /home ForceCommand internal-sftp Include /etc/ssh/ssh_config.d/*.conf and usermod -aG sftp_users gogo but user gogo still able to access SSH what I missed? |
please ignore.. this is my bad!..I did wrong config.
it works now, thank you, but how about if we also want to give them access to other folder like /var/www/html and /home/public? need your advice/ thanks |
You might consider a bind mount of the other directories into the accounts' chroot directories.
|
All times are GMT -5. The time now is 07:38 PM. |