国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)管 > 服務(wù)器 > 正文

SSH啟動失敗解決方法

2020-05-27 13:33:34
字體:
供稿:網(wǎng)友

   VPS是3個人合租共用的,不知道誰操作了什么導(dǎo)致SSH啟動失敗,一直連接不上剛開始以為系統(tǒng)壞了呢,后面通過VPS終端登陸上去發(fā)現(xiàn)SSH服務(wù)沒在運行,于是嘗試運行SSHD發(fā)現(xiàn)出現(xiàn)如下錯誤:

  Starting sshd:

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  @ WARNING: UNPROTECTED PRIVATE KEY FILE! @

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  Permissions 0777 for ‘/etc/ssh/ssh_host_rsa_key’ are too open.

  It is recommended that your private key files are NOT accessible by others.

  This private key will be ignored.

  bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key

  Could not load host key: /etc/ssh/ssh_host_rsa_key

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  @ WARNING: UNPROTECTED PRIVATE KEY FILE! @

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  Permissions 0777 for ‘/etc/ssh/ssh_host_dsa_key’ are too open.

  It is recommended that your private key files are NOT accessible by others.

  This private key will be ignored.

  bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key

  Could not load host key: /etc/ssh/ssh_host_dsa_key

  Disabling protocol version 2. Could not load host key

  sshd: no hostkeys available — exiting.

  [FAILED]

  解決方法:

  #chmod 600 sshd_config ssh_host_dsa_key ssh_host_key ssh_host_rsa_key

  #chmod 620 moduli

  #chmod 644 ssh_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub

  #service sshd start

  再次出現(xiàn)如下錯誤:

  [root@bailongjun ssh]# service sshd restart

  Stopping sshd: [FAILED]

  Starting sshd: /var/empty/sshd must be owned by root and not group or world-writable.

  [FAILED]

  在終端上直接登錄,問題顯示如下:

  /var/empty/sshd must be owned by root and not group or world-writable.

  問題:

  Linux上的SSH無法啟動

  報告/var/empty/sshd must be owned by root and not group or world-writable.

  解決辦法:

  首先通過物理終端進入到linux上,手工檢查ssh發(fā)現(xiàn)沒運行

  -bash-2.05b# /etc/init.d/sshd status

  sshd is stopped

  手工啟動服務(wù),發(fā)現(xiàn)報告權(quán)限錯誤。

  -bash-2.05b# /etc/init.d/sshd start

  Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable.

  [FAILED]

  -bash-2.05b#

  使用rpm -V 命令可檢查到ssh的軟件包正常,但某個目錄的屬主錯誤。

  -bash-2.05b# rpm -V openssh-server

  S.5….. c /etc/ssh/sshd_config

  …..U.. /var/empty/sshd

  -bash-2.05b#

  經(jīng)查看發(fā)現(xiàn)這個目錄的屬主不是root,所以啟動ssh報錯

  -bash-2.05b# ls -ld /var/empty/sshd/

  d–x–x–x 2 vu00106 root 1024 Feb 2 2005 /var/empty/sshd/

  -bash-2.05b#

  修改為root屬主,啟動成功

  -bash-2.05b# chown root /var/empty/sshd/

  -bash-2.05b# /etc/init.d/sshd start

  Starting sshd: [ OK ]

  -bash-2.05b#

  至此問題修復(fù)。

  另外,還可以嘗試:

  這個是權(quán)限的問題

  可采取以下兩步解決

  chown -R root.root /var/empty/sshd

  chmod 744 /var/empty/sshd

  service sshd restart

  就可以解決上述的問題。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 鹿泉市| 青神县| 上高县| 五家渠市| 孙吴县| 淳安县| 平阴县| 左云县| 峡江县| 河津市| 乐安县| 德格县| 武山县| 武平县| 类乌齐县| 图们市| 深泽县| 忻城县| 成都市| 会泽县| 永仁县| 恩施市| 化隆| 石景山区| 叶城县| 黄冈市| 新干县| 年辖:市辖区| 蒲城县| 昆山市| 广丰县| 浠水县| 浏阳市| 沂南县| 横峰县| 灵石县| 库车县| 文登市| 甘德县| 中牟县| 乌兰察布市|