linux下ssh服务,Linux下SSH服务器 sshd服务启动报错处理方法

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值