开启ssh------解决远程登录失败的问题
来源:互联网 发布:曼德拉效应知乎 编辑:程序博客网 时间:2024/05/16 08:45
有的时候别人可能登录不上你的电脑或者无法登录到服务器,最可能出现的问题就是ssh出现了问题。
[root@zong_pc zong]# /etc/init.d/sshd status //在linux下查看ssh的状态openssh-daemon (pid 2309) 正在运行...[root@zong_pc zong]# [root@zong_pc zong]# /etc/init.d/sshd start //若是ssh处于关闭状态,则可以手动开启服务
[root@zong_pc /]# /etc/init.d/sshd close用法: /etc/init.d/sshd {start|stop|restart|reload|force-reload|condrestart|try-restart|status}[root@zong_pc /]# /etc/init.d/sshd stop停止 sshd: [确定][root@zong_pc /]# /etc/init.d/sshd statusopenssh-daemon 已停[root@zong_pc /]# /etc/init.d/sshd start正在启动 sshd: [确定][root@zong_pc /]# /etc/init.d/sshd stop停止 sshd: [确定][root@zong_pc /]#
可以直接按以下方法操作:
vim /etc/ssh/sshd_config 截的部分代码: 39 # Authentication: 40 41 #LoginGraceTime 2m 42 PermitRootLogin no 43 #StrictModes yes 44 #MaxAuthTries 6 45 #MaxSessions 10 46若PermitRootLogin后的参数为no,则会出现这样的提示:[root@zong_pc ssh]# ssh 192.168.40.223ssh: connect to host 192.168.40.223 port 22: No route to host具体步骤总结::因此,只需将其后的参数改为yes就可以了。PermitRootLogin yes修改完成后,先打开ssh:/etc/init.d/sshd start然后ssh需要重新启动 /etc/init.d/sshd restart
当然,也可能出现下面这种情况:
[root@localhost zhangna]# ssh 192.168.40.22@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that the RSA host key has just been changed.The fingerprint for the RSA key sent by the remote host is8b:d9:17:7d:97:d5:19:02:a1:27:9f:cc:b8:31:20:34.Please contact your system administrator.Add correct host key in /root/.ssh/known_hosts to get rid of this message.Offending key in /root/.ssh/known_hosts:1RSA host key for 192.168.40.22 has changed and you have requested strict checking.Host key verification failed.[root@localhost zhangna]# rm -rf /root/.ssh/known_hosts [root@localhost zhangna]# ssh 192.168.40.22The authenticity of host '192.168.40.22 (192.168.40.22)' can't be established.RSA key fingerprint is 8b:d9:17:7d:97:d5:19:02:a1:27:9f:cc:b8:31:20:34.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added '192.168.40.22' (RSA) to the list of known hosts.Address 192.168.40.22 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!root@192.168.40.22's password: Last login: Wed Jan 13 10:46:24 2016 from 192.168.40.222[root@localhost ~]#
1 0
- 开启ssh------解决远程登录失败的问题
- 新安装的OpenSuse11.3, 用Xshell基于ssh的远程登录失败问题的解决
- freebsd ssh 服务器登录失败问题的解决
- freenas开启ssh远程登录
- FreeBSD开启SSH远程登录
- [已解决]SSH远程登录失败,提示“Password authentication failed”
- SecureCrt 远程登录(ssh)失败
- FreeBSD9.0开启SSH远程登录
- ubuntu开启root用户ssh远程登录
- ubuntu开启root用户ssh远程登录
- ubuntu开启SSH服务远程登录
- 树莓派开启root SSH远程登录
- 解决Ubuntu 16.04 SSH 无法远程登录问题
- 解决Ubuntu 16.04 SSH 无法远程登录问题
- 解决Linux系统下SSH远程登录很慢的问题
- 远程操作linux网络设置(五)-ssh登录慢有延迟问题的解决
- 解决SSH安装失败的问题
- Ubuntu ssh远程root用户登录失败
- Linux环境下 使用JXL生成Excel时发生java.lang.ArrayIndexOutOfBoundsException
- GD生成缩略图函数
- sicily 1063. Who's the Boss
- 重视客户体验,工厂易购在路上!
- HDU ACM 1007 Quoit Design
- 开启ssh------解决远程登录失败的问题
- 深入剖析Java中的装箱和拆箱
- HttpURLConnection与HttpClient区别及联系
- html5 Up and Running学习笔记(一)
- 利用Spring随时随地获得Request和Session
- CentOS6.5 配置VNC配置
- 【poj3831】Open-air shopping malls
- HDU I Hate It 线段树单点更新
- jqGrid单元格内容设置其内容的字体颜色