centos ssh连不上但双方都能ping通
本地的系统是windowscentos是在本地的虚拟机中的ping检测时 ,双发能够ping通的,sshd服务也开启了,但是用ssh工具连接时,又连不上Connecting to 192.168.122.1:22...Canceled.Type `help' to learn how to use Xshell prompt.vi/etc/sysconfig/networ...
·
本地的系统是windows centos是在本地的虚拟机中的
ping检测时 ,双发能够ping通的,sshd服务也开启了,但是用ssh工具连接时,又连不上
Connecting to 192.168.122.1:22...
Canceled.
Type `help' to learn how to use Xshell prompt.
vi /etc/sysconfig/network-scripts/ifcfg-ens33
-----
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=8e6176e5-5245-4d3c-bd24-d63115ece0f0
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.253.1
NETMASK=255.255.255.0
GATEWAY=192.168.253.2
DNS1=101.198.199.200
ZONE=public
结果发现是 IPADDR 和本地的IPADDR 是一致的,冲突里,改成不一样就解决了
IPADDR=192.168.253.1
[root@localhost network-scripts]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.253.2 netmask 255.255.255.0 broadcast 192.168.253.255
inet6 fe80::a17:7dd5:c798:f0df prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:a2:5c:8f txqueuelen 1000 (Ethernet)
RX packets 752647 bytes 1115601889 (1.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 268170 bytes 16566157 (15.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
要保证这里的 inet 信息和windows 所显示的ip地址是不一样的就行
更多推荐
已为社区贡献3条内容
所有评论(0)