Deny SSH- but allow SFTP access

This is an alternative way of limiting the SSH access to only SFTP explained in my How to restrict users to SFTP only instead of SSH post.Edit your /etc/sshd_config file and change your settings like thisMatch User usernameAllowTcpForwarding noX11Forwarding noForceCommand /usr/libexec/sftp-server -l INFO Replace username with the user name you would limit the SSH access for.