ssh连接不上
来源:互联网 发布:iphone备忘录软件 编辑:程序博客网 时间:2024/04/28 21:25
ssh远程不到服务器,
不知道谁操作了什么导致SSH启动失败,一直连接不上服务器,刚开始以为系统坏了呢。
提示如图:
650) this.width=650;" onsubmit onchange onunload onselect onreset>
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
再次出现如下错误:
[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发现没运行
# /etc/init.d/sshd status
sshd is stopped
手工启动服务,发现报告权限错误。
# /etc/init.d/sshd start
Starting sshd:/var/empty/sshd must be owned by root and not group or world-writable.
[FAILED]
使用rpm -V 命令可检查到ssh的软件包正常,但某个目录的属主错误。
# rpm -V openssh-server
S.5..... c /etc/ssh/sshd_config
.....U.. /var/empty/sshd
经查看发现这个目录的属主不是root,所以启动ssh报错
# ls -ld /var/empty/sshd/
d--x--x--x 2 vu00106 root 1024 Feb 2 2005 /var/empty/sshd/
修改为root属主,启动成功
# chown root /var/empty/sshd/
# /etc/init.d/sshd start
Starting sshd: [ OK ]
至此问题修复。
另外,还可以尝试:
这个是权限的问题
可采取以下两步解决
chown -R root.root /var/empty/sshd
chmod 744 /var/empty/sshd
service sshd restart
就可以解决上述的问题。
备注:最近遇到pshell 连接不上远程服务器
提示 the other side doesnot support ssh protocol on this port
重启远程机器的ssh服务
结果报错:sshd: no hostkeys available — exiting
最后使用上述命令,尤其最后三步,重启sshd服务成功
- ssh连接不上
- ssh连接不上
- ssh 连接vmwear不上
- ubuntu连接ssh不上
- Freebsd ssh连接不上
- SSH连接不上Linux
- ssh连接不上解决
- SSH连接不上的解决办法
- FreeBSD系统SSH连接不上?
- SSH连接不上Linux的解决方法
- 解决backtrack5连接不上ssh问题
- 绝对原创!ssh连接不上ubuntu
- FreeBSD系统SSH连接不上?
- FreeBSD系统SSH连接不上?
- ssh 连接不上 oracle linux 7.2
- 树莓派ssh连接不上的问题
- ssh 连接不上ubantu的问题
- Ubuntu连接不上SSH解决办法
- hd 5236 Work
- activemq----java.io.EOFException
- Activity WMS ViewRootImpl三者关系(Activity创建窗口 按键分发等)
- Codeforces Round #294 (Div. 2) E 树上倍增lca
- 定位 position
- ssh连接不上
- 使用NDK-r8与Cygwin编译生成so库
- |Tyvj|NOIP2004|动态规划|P1067 合唱队形
- Android 编写地图软件
- css3 超好用的border
- puppet自动化运维之file资源
- UVALive 7512
- 从10万到百亿营收的背后 | 同程旅游CTO V课堂实录
- 【Android Studio】AndroidManifest