Not able to SSH to my Centos 6.5

Issues related to configuring your network
Post Reply
AnksD
Posts: 3
Joined: 2018/11/04 16:37:29

Not able to SSH to my Centos 6.5

Post by AnksD » 2018/11/04 17:23:04

Hi friends,
i am new to non windows environment. I have created a Centos 6.5 OS virtual machine on VMWare workstation 14. When i am trying to do SSH from my windows 10 host machine, it's not allowing. Here is the content of ifcfg-eth0 file (vim /etc/sysconfig/network-scripts/ifcfg-eth0)

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
IPADDR=
DNS1=
NETMASK=


Output of file sshd_config (vi /etc/ssh/sshd_config) is attached as screenshot (sshd_config_*.gif files).

I tried a lot to troubleshoot using options provided in other posts but nothing worked. So posting this new thread. Your help will be appreciated.
Attachments
sshd_config_3.gif
sshd_config_3.gif (46.22 KiB) Viewed 332 times
sshd_config_2.gif
sshd_config_2.gif (44.69 KiB) Viewed 333 times
sshd_config_1.jpg
sshd_config_1.jpg (84.6 KiB) Viewed 333 times

User avatar
TrevorH
Forum Moderator
Posts: 24048
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Not able to SSH to my Centos 6.5

Post by TrevorH » 2018/11/04 17:36:46

Well your first mistake was to install 6.5 which came out in December 2013 and is thus 5 years out of date. It has numerous known and exploitable vulnerabilities which mean that it should not be used. If you must install CentOS 6 at all (it only has 2 more years of life left) then you should be installing 6.10 not 6.5. You can run yum update to go from 6.5 to 6.10 so that should be on your list of things to do ASAP.

CentOS 7 is more recent and will go EOL in 2024 so has considerably more life left in it. The current version is 7.5 and RHEL 7.6 was released a few days ago which means that CentOS 7.6 is in the process of being built now.

I presume that your ifcfg-eth0 does not read exactly how you posted it and that you removed the IPADDR=/NETMASK= and DNS1= parameters for some sort of security by obscurity. They may well be relevant to this problem.

Your sshd_config is not useful as you posted it as that only shows the first screenful and it's 138 lines long according to the status line at the bottom of your editor. It's probably not the problem anyway unless you have edited it and adjusted it.

Is your network interface up and running? What is the output from ip link show and ip addr show and ip route show ? Can you ping your host system from the VM if you logon at its console? Can you ping the guest from the host? What is the output from the command iptables-save run on the guest?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

AnksD
Posts: 3
Joined: 2018/11/04 16:37:29

Re: Not able to SSH to my Centos 6.5

Post by AnksD » 2018/11/04 17:46:28

HI, Sorry for not able to post sshd_config file correctly. Attached the output u wanted to see.
Attachments
Output.gif
Output.gif (49.52 KiB) Viewed 328 times

User avatar
TrevorH
Forum Moderator
Posts: 24048
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Not able to SSH to my Centos 6.5

Post by TrevorH » 2018/11/04 18:52:54

OK, so you have an interface and it's up and it has an ip address. All that is good.

I find it odd that you get a dropped packet trying to ping your VM from the host. That's odd. Are you 100% sure that that ip address isn't already in use by something else?

Then you cannot ping the host either. That could be due to windows firewall maybe?

Can you ping 192.168.29.1 (your default gateway)?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

AnksD
Posts: 3
Joined: 2018/11/04 16:37:29

Re: Not able to SSH to my Centos 6.5

Post by AnksD » 2018/11/04 19:09:52

Hi Trevor,
the packets drop are happening from VM to windows box (i.e. host).From windows, its able to run.

Attached is the output as u asked for.
Attachments
Output1.gif
Output1.gif (28.54 KiB) Viewed 315 times

User avatar
TrevorH
Forum Moderator
Posts: 24048
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Not able to SSH to my Centos 6.5

Post by TrevorH » 2018/11/04 22:04:25

the packets drop are happening from VM to windows box (i.e. host).From windows, its able to run.
No, that's not correct, the packet drop I was referring to was in the screenshot of you pinging the guest from the host. That is suspicious and might indicate a duplicate ip address in use on your network.

You still need to show the output from iptables-save
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply