VMware Cloud Community
vDeepak
Enthusiast
Enthusiast

Unable to connect to ESX server through Putty!

I recently configured a new host ESX 3.5 and tride to add to my VC server 3.0 and am able to do that with Ip of ESX server, not by name!

Also am not able to connect to ESX through putty..it seems to be some issues with DNS configuration over ESX server!

Am able to ping both ESX and VC sevrer and vice versa.

Will you please let me know how should i reconfigure ESX DNS file or else possible cause of issue?

0 Kudos
38 Replies
athlon_crazy
Virtuoso
Virtuoso

1. SSH by default not permit root access. create any user & grant shell access. Then putty using this account & "su -" if you want to become root.

2. Add esx host to vCenter via IP is okay, but later when you enable HA, this could be a problem. Resolve those esx with valid fqdn or temporarily use hosts file in your vCenter

vcbMC-1.0.6 Beta

vcbMC-1.0.7 Lite

http://www.no-x.org
0 Kudos
vDeepak
Enthusiast
Enthusiast

I already created a user and provided him shell access and am using same for login to ESX , but the error message that am getitng is not access denied!

Am getting this error message while connecting through putty :- Network error: Connection refused

Also will you please elaborate this term "Resolve those esx with valid fqdn or temporarily use hosts file in your vCenter "

FYI: i already provided ESX during installtion a valid FQDN and the only way am able to login to root of esx server is through ILO.

and through ILo when am using command "hostname" , am getting the exact one that i given durng installtion with proper FQDN.

It seems to be DNS issue.

0 Kudos
anujmodi1
Hot Shot
Hot Shot

Deepak,

If you are getting connection refused error message, this means that ssh session unable to connect with the ssh port on the ESX host server. Sometimes, if your firewall in not allowing to connect on port 22 with esx server, you get this error message. Check all the firewall settings and make sure you open the port 22 for ssh session.

If you think the firewall is configured properly. Then you need to check the firewall settings on esx host server and do netstat -an to verify if its allowing port 22.

Still problem esxists, do a firewall reset on the esx host server using command

esxcfg-firewall -r

and then renable the ssh port and try once again.

Enjoy

AM,

If you found my answer to be useful, feel free to mark it as Helpful or Correct.

The latest blogs and articles on Virtulization:

http://communities.vmware.com/blogs/amodi

Anuj Modi, If you found my answer to be useful, feel free to mark it as Helpful or Correct. The latest blogs and articles on Virtulization: anujmodi.wordpress.com
0 Kudos
athlon_crazy
Virtuoso
Virtuoso

1) Double check your ssh server is running & do you able to ssh via using address instead fqdn?

2) run this on your esx "hostname --fqdn" & do nslookup from vCenter, can vCenter or any client resolve the esx name?

vcbMC-1.0.6 Beta

vcbMC-1.0.7 Lite

http://www.no-x.org
0 Kudos
vDeepak
Enthusiast
Enthusiast

Guys, as i tld earlier this issue is related to DNS ?:|

I checked the firewall's and all eveythng seems ok and also no issues with port. there is something wrong in DNS entry at esx server.

Am only able to pinig this esx with Ip, its name is not resolving.

I provided this ESX static Ip and given a proper FQDN that i am getting too using commands "Hostname" at root of esx.

So ideas are required to check its DNS config..i suppose!

0 Kudos
athlon_crazy
Virtuoso
Virtuoso

So, this not ESX problem. When u unable to ping it via fqdn normally it's down to your DNS server. Do you have any DNS server doing name resolution for your servers?

vcbMC-1.0.6 Beta

vcbMC-1.0.7 Lite

http://www.no-x.org
0 Kudos
TomHowarth
Leadership
Leadership

Firstly can you actually Ping your ESX host with the FDQN or hte short name, secondly can you ping the host by its IP address.

if so can you issue this command to at the console (either physically in front of or via the iLO)

esxcfg-firewall -q

to check the status of the sshd

if it is not active use

esxcfg-firewall -e sshClient to enable it

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author for the upcoming book "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://my.safaribooksonline.com/9780136083214]”. Currently available on roughcuts

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
TomHowarth
Leadership
Leadership

Remember that DNS and name resolution is case sensitve in ESX. MyHost.MyDomain.Com is completely different from myhost.mydomain.com

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author for the upcoming book "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://my.safaribooksonline.com/9780136083214]”. Currently available on roughcuts

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
anujmodi1
Hot Shot
Hot Shot

Simply add the host enter into /etc/hosts in esx server if still facing dns issue.

AM,

If you found my answer to be useful, feel free to mark it as Helpful or Correct.

The latest blogs and articles on Virtulization:

http://communities.vmware.com/blogs/amodi

ttp://vsolutions.compare2shop.com

Anuj Modi, If you found my answer to be useful, feel free to mark it as Helpful or Correct. The latest blogs and articles on Virtulization: anujmodi.wordpress.com
0 Kudos
vDeepak
Enthusiast
Enthusiast

Tom: i checked the firewall ..there is nothng blocled there..everythng seems ok..am able to see SshClient under Enabled services while executing the command esxcfg-firewall -q.

Folks:server is up and running as i am able to ping it and connect it to VC through IP. Also configuration is properly done in ESX during installtion as still am getting the same FQDN that i assigned it during its installtion with command "hostname" at root of ESX.

Am checking the other options.

0 Kudos
athlon_crazy
Virtuoso
Virtuoso

Adding entry into esx /etc/hosts file alone couldn't resolve name resolution prob. This should be done end-to-end. In TS case, if no internal DNS server involve, TS could resolve this via "hosts" file on both ESX & vCenter server.

vcbMC-1.0.6 Beta

vcbMC-1.0.7 Lite

http://www.no-x.org
0 Kudos
pyosifov
Enthusiast
Enthusiast

From your post - the correct answer should be - add the hots entry - IP ADDRESS esx1.vmware.net esx1 (put the short name too) in the vCenter's windows hosts file.

Also I would recommend adding it to your management PC's hosts file.

C:\Windows\system32\driver\etc\hosts if you don't know the path.

Actually this should not correspond to PUTTY access - you should be able to connect via PUTTY using the IP of the ESX

0 Kudos
TomHowarth
Leadership
Leadership

That may be the case, but have you actually checked the case of the FDQN ie verifying on the ESX server and then confirming that it is exactly the same in your DNS server. this is a common issue when using Windows based DNS services as they are not case sensitive.

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author for the upcoming book "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://my.safaribooksonline.com/9780136083214]”. Currently available on roughcuts

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
vDeepak
Enthusiast
Enthusiast

There is already proper entry at this location : C:\Windows\system32\driver\etc\hosts with FQDN...do mean to day somtimes that entry gets deleted? if yes then may i knw why.

Meanwhile am chekcing the other options suggested by you of configuring the etc\host

0 Kudos
pyosifov
Enthusiast
Enthusiast

Actually - no. The hosts file should not get deleted (if I have got your question right).

If your IP network is OK (Zoning, Security and so on), the FQDN entries on the ESX servers and the vCenter Server are correct, the you really should have no problem.

Check for stupid mistakes - usually I make such when I'm stuck with something - let's say naming mistake, IP mistake... something like that.

How many ESX Servers do you have? Are their hosts files configured properly and are they the same (they should be). If so try pinging by name from one ESX to another.

0 Kudos
vDeepak
Enthusiast
Enthusiast

aah...i thnk that may be cause..the fact of stupid thngs Smiley Happy and misakes! lol

i checked and found from network end everythng is OK and i have only 2 hosts in a cluster and the other hosts is wroking fine and am able to connect that host with putty too.

i checked there host files too...and found proper entry for them with there there Ip address.

but recalling back of stupid mistkes...i thnk one thng i had done is : I provide my esx server dynamic Ip address during installtion and the issue is that we dnt have access to DNS server (due to security reasons)...so now what now the case is that:

1. Is there way that we provide and reconfigure Ip addressing type over ESX server...earlier it was dynamic ( and may be there was issue with DNS server ) and now i want it to provide static?

2. anythng else tht can be done..

i really mugged up Smiley Sad

0 Kudos
anujmodi1
Hot Shot
Hot Shot

Change the ip address using following command and replace the IP accordingly.

#esxcfg-vswif -a vswif0 -p Service\ Console -i 10.1.1.1 -n 255.255.255.0 -b 10.1.1.255

AM,If you found my answer to be useful, feel free to mark it as Helpful or Correct.

The latest blogs and articles on Virtulization:

http://communities.vmware.com/blogs/amodi

http://vsolutions.compare2shop.com

Anuj Modi, If you found my answer to be useful, feel free to mark it as Helpful or Correct. The latest blogs and articles on Virtulization: anujmodi.wordpress.com
0 Kudos
Ryan2
Enthusiast
Enthusiast

Also, don't forget to change the default gateway: nano /etc/sysconfig/network

When you're done, verify that you don't have anything hard coded in the ESX hosts file: nano /etc/hosts

Finally, restart network services using "service network restart" and restart managment software using with "service mgmt-vmware restart" You can verify everything with the following: service console ip: esxcfg-vswif --l

Good luck.

0 Kudos
pyosifov
Enthusiast
Enthusiast

Those guys have posted a right way to do that.

But I would always go for the GUI. Just go to "Configurations" tab through VI Client, "Networking" and Properties of the vSwitch.

Choose the "Service Console" port group and click "Edit". You should get a warning message that you could loose connectivity.

Click "Continue modifying this connection" and follow the wizard.

You should be fine then.

Good luck!