禁止使用者ssh 但擁有其他服務

先到 /etc/passwd這邊
把/bin/bash 改成 /sbin/nologin

然後到 /etc/shells
看看有沒有 /sbin/nologin
沒有的話加上去

以上