Linux下SSH伺服器 sshd服務啟動報錯處理方法

來源:互聯網
上載者:User

192.168.50.58: /usr# /usr/sbin/sshd

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         
WARNING: UNPROTECTED PRIVATE KEY
FILE!         
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions
0777 for '/usr/local//etc/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:
/usr/local//etc/ssh_host_rsa_key
Could not load host key:
/usr/local//etc/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         
WARNING: UNPROTECTED PRIVATE KEY
FILE!         
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions
0777 for '/usr/local//etc/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:
/usr/local//etc/ssh_host_dsa_key
Could not load host key:
/usr/local//etc/ssh_host_dsa_key
Disabling protocol version 2. Could not load
host key
sshd: no hostkeys available -- exiting.

進入 /usr/local/etc# 查看有沒有下面這些檔案, 這些檔案是配置, 如果缺少它會提示。 上面的錯誤是由於下面的這些檔案的許可權問題導致的。
MiniGUI.cfg           ssh_host_dsa_key      ssh_host_rsa_key      sshd_config
ssh_config            ssh_host_dsa_key.pub  ssh_host_rsa_key.pub
我們將這些檔案設定為 600  即可。
192.168.50.58: /usr/local/etc# chmod 600 ssh*
下面你就可以啟動了。
/usr/sbin/sshd

這個是許可權標準的配置:
-rwxr-xr-x    1 root     root          1554 Mar 21 10:37 ssh_config
-rw-------    1 root     root           668 Mar 21 10:42 ssh_host_dsa_key
-rw-r--r--    1 root     root           609 Mar 21 10:42 ssh_host_dsa_key.pub
-rw-------    1 root     root          1679 Mar 21 10:40 ssh_host_rsa_key
-rw-r--r--    1 root     root           401 Mar 21 10:40 ssh_host_rsa_key.pub
-rwxr-xr-x    1 root     root          3177 Mar 21 10:37 sshd_config

  伺服器, accessible, private, files, Linux
相關文章
  • ubuntu下samba伺服器的搭建
  • 一個 c#寫的 ssh用戶端
  • 新版ubuntu中開啟終端的方法和安裝ssh 的方法
  • securecrt 背景黑色 即終端選擇為linux的配色
  • 陳偉平-嵌入式linux 裁減、linux驅動、電路設計、單片機設計、單片機編程
  • windowns下遠端偵錯linux下程式(mingw+gdb+slickedit+gdbserver)(有待完善)前言:
  • 反射屬性時 propertyinfo 中的 propertytype屬性 帶有泛型 nullable 的處理方法
查看更多>>
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.