閱讀109 返回首頁    go 技術社區[雲棲]


一次SSH異常的排查

ssh無法啟動,service sshd status 結果如下,沒有明顯的異常

ssh1

sshd -t

測試一下
ssh2
錯誤很明顯

vi /etc/ssh/sshd_config

將對應的行先注釋掉重啟失敗,
查看詳細信息

systemctl status sshd.service

ssh3

/usr/sbin/sshd -t

測試(其實錯誤已經很明顯了,咱們再看詳細點的)

ssh4

根據提示,把涉及的key文件全部改成600後

/usr/sbin/sshd -t

測試沒有報錯了,啟動服務,正常登陸

Sshd –t還是非常好使的

-t      Test mode.  Only check the validity of the configuration file and

             sanity of the keys.  This is useful for updating sshd reliably as

             configuration options may change.

最後更新:2017-06-14 21:34:39

  上一篇:go  yum報錯 pycurl.so: undefined symbol: CRYPTO_num_locks
  下一篇:go  阿裏雲上小,中,大型網站解決方案