Page 1 of 1

Unable to SSH into brand new Centos VM

Posted: 2020/06/26 04:45:33
by skb007
I have a laptop running windows 10 and I have installed VMWare WorkStation 15.
I have installed Centos7 on Vmware Workstation guest.
SELinux has been diabled.
Firewall has been tuened off.
SSHD is running.
IP address of Centos7 has been statically assigned as 192.168.1.222 Mask 255.255.255.0 and gateway as 192.168.1.1.
Centos7 is able to ping the gateway as well Vmware host machine and it is able to access internet.
IP address of Vmware Host is 192.168.1.200 Mask 255.255.255.0 Gateway 192.168.1.1.

But i am unable to ping/scp/ssh/ftp/sftp into the centos7 from the Vmware host machine.

Any help would be much appreciated.

Code: Select all

[root@localhost selinux]#[b] systemctl status sshd[/b]
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-06-25 20:38:03 PDT; 59min ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 915 (sshd)
    Tasks: 1
   Memory: 1.9M
   CGroup: /system.slice/sshd.service
           └─915 /usr/sbin/sshd -D

Jun 25 20:38:01 localhost.localdomain systemd[1]: Starting OpenSSH server daemon...
Jun 25 20:38:03 localhost.localdomain sshd[915]: Server listening on 0.0.0.0 port 22.
Jun 25 20:38:03 localhost.localdomain sshd[915]: Server listening on :: port 22.
Jun 25 20:38:03 localhost.localdomain systemd[1]: Started OpenSSH server daemon.

[root@localhost selinux]# [b]systemctl status firewalld[/b]
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

[root@localhost selinux]# [b]netstat -rn[/b]
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eno16777736
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eno16777736
172.17.0.0      0.0.0.0         255.255.0.0     U         0 0          0 docker0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eno16777736
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr0

[root@localhost selinux]#[b] ip addr show eno16777736[/b]
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:d7:08:7e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.222/24 brd 192.168.1.255 scope global eno16777736
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fed7:87e/64 scope link 
       valid_lft forever preferred_lft forever

[root@localhost selinux]# 

Re: Unable to SSH into brand new Centos VM

Posted: 2020/06/26 08:29:15
by TrevorH
IP address of Centos7 has been statically assigned as 192.168.1.222 Mask 255.255.255.0 and gateway as 192.168.1.1.
Does it work if you use DHCP? I seem to remember that vmware blocks traffic from static ip addresses that it thinks are part of its DHCP pool. Also check your vmware network settings as it will need to be in the equivalent of what KVM calls bridged mode.

Re: Unable to SSH into brand new Centos VM

Posted: 2020/06/26 14:05:40
by skb007
No, it does not work with DHCP. That is how it was to begin with then I decided to give it a static IP.
Network adapter is configured in "Bridged" mode for the VM. I tried to change it to NAT but that did not help either.

Vmware host does not even see the MAC (arp) address of the guest.
I have tried to run tcpdump/wireshark on Centos7 to see if there is any attempt of ssh request coming in but nothing.
There is no sign of any anomaly in /var/log/messages or /var/log/secure.

I am stumped.

Re: Unable to SSH into brand new Centos VM

Posted: 2020/07/01 04:17:41
by skb007
Anyone ??