XShell连接不了虚拟机linux Could not connect to '127.0.0.1' (port 22): Connection failed.
来源:互联网 发布:clover软件官网 编辑:程序博客网 时间:2024/05/23 00:00
今天出现了一个问题,XShell连接不了虚拟机linux,出现了Could not connect to '127.0.0.1' (port 22): Connection failed.这个问题
网上查了好多个办法都没法解决,因为自己是自定义安装的centos 6.5版本的虚拟机,自己进行分区,但XShell就是连接不上,如图:
一开始查看虚拟机的ip,用ifconfig,发现只有l0端口的IP地址是:127.0.0.1,于是关闭了防火墙
停止防火墙 service iptables stop
启动防火墙 service iptables start
查看防火墙配置 iptables -L -n
发现还是不行,之后ifconfig -a 查看所有的发现etho竟然没有IP地址,于是查了申请ip的命令
1、申请ipdhclient eth02、释放ipdhclient eth0 -r3、windows命令行相应命令ipconfig /renewipconfig /release
CentOS配置网卡开机自动获取IP地址:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
将 ONBOOT="no" 改为 ONBOOT="yes"
保存后: service network restart
最后是这样的 :vi /etc/sysconfig/network-scripts/ifcfg-eth0
将 ONBOOT="no" 改为 ONBOOT="yes"
保存后: service network restart
终于有ip地址了,在XShell上访问时这样子的:
重启linux后仍然有ip并且可以访问!
大功告成!
2 0
- XShell连接不了虚拟机linux Could not connect to '127.0.0.1' (port 22): Connection failed.
- XShell连接不了(ubunt14.04)虚拟机Could not connect to ‘192.168.1.105’ (port 22): Connection failed
- 用xshell 连接服务器提示:Could not connect to '192.168.0.104' (port 22): Connection failed.
- xshell为什么连接不上ubuntu---could not connect to 'ip' (port 22): Connection failed.
- Xshell远程连接Linux服务器出错——Could not connect to '114.214.166.5' (port 22): Connection failed.
- Could not connect to '127.0.0.1' (port 22): Connection failed.
- ssh 不能连接linux系统 Could not connect to '192.168.X.X'(port 22) Connection failed
- Could not connect to '192.168.80.145' (port 22): Connection failed的解决办法(远程连不上xshell)
- Could not connect to '192.168.80.145' (port 22): Connection failed的解决办法(远程连不上xshell)
- Could not connect to '10.7.100.182' (port 22): Connection failed
- Could not connect to '192.168.1.188' (port 22): Connection failed.远程连接centos失败
- xshell为什么连接不上ubuntu---ould not connect to 'ip' (port 22): Connection failed.
- 用xshell5连接vmware10+centos6.7时报Could not connect to '192.168.54.100' (port 22): Connection failed的解法
- Could not connect to '10.203.87.140' (port 22): Connection faile
- Linux连接redis客户端出现Could not connect to Redis at 127.0.0.1:6379: Connection refused
- Xshell链接错误:Could notconnect to '192.168.18.128' (port 22): Connection failed.
- Xshell链接错误:Could notconnect to '192.168.18.128' (port 22): Connection failed.
- UE4 connect to 127.0.0.1 port 52314 failed: Connection refused)
- 【Jquery】jquery为select添加option
- Camera构图之三分法
- 拷贝构造函数
- 【RMAN】数据库备份之常用备份命令
- storm集群使用经验
- XShell连接不了虚拟机linux Could not connect to '127.0.0.1' (port 22): Connection failed.
- iOS 隐藏/去掉 导航栏返回按钮中的文字
- OFBIZ 账户与Party PartyRelationship关系分析
- NOI库7650 不定方程求解
- 磁盘驱动器卷标名称
- QT5 学习之路05---QT5基本对话框2
- QCustomPlot之布局系统
- Java四种线程池的使用
- test9.7