如何禁止掉root登录,使用key密钥登录
生活随笔
收集整理的這篇文章主要介紹了
如何禁止掉root登录,使用key密钥登录
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?在Linux系統下執行命令:
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
vim /etc/ssh/sshd_config
AuthorizedKeysFile ? ? ?.ssh/authorized_keys
RSAAuthentication ? ? ? yes
PubkeyAuthentication yes
PasswordAuthentication no
service sshd restart?
?
總結
以上是生活随笔為你收集整理的如何禁止掉root登录,使用key密钥登录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (十六)深入浅出TCPIP之Hello
- 下一篇: (十)深入浅出TCPIP之网络阻塞和非阻