設定 Linux 只允許某些使用者遠端登入

編輯 /etc/ssh/sshd_config 檔案.

加入允許的使用者
AllowUsers sam root
AllowGroups wheel

設定完後記得重新啟動 sshd
# service sshd restart

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.