VMware Cloud Community
pesinet
Contributor
Contributor
Jump to solution

Using PuTTY cannot connect to the Host!!!

Hello people.

I am trying to use puTTY to connect to the Host but i can't. Message said - Network error: Connection refused. Any help.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
weinstein5
Immortal
Immortal
Jump to solution

In terms of virtualizing there is no real difference but how you interact with directly there is - the console, usually referred to as the Service Console is part of ESX. It is in essence a virtual machine running RHEL that is used to manage and control your ESX server. Being linux based it is allows for SSH ocnnections and it is what you connect to you use an SSH client like Putty. In ESXi the management and control functionality is part of the vmkernel which is the O/S of the ESXi server. It is no longer using RHEL so there is no SSH connection capability so Putty will not work. VMware has replaced the Service Console with Remote CLI - which gives you the functinality of the Service Console.

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

View solution in original post

0 Kudos
21 Replies
lamw
Community Manager
Community Manager
Jump to solution

Did you enable root login from the console?

If not, you'll need to follow this KB:

Did you also ensure that SSH server is running?

service sshd status

To start:

service sshd start

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

If you find this information useful, please award points for "correct" or "helpful".

weinstein5
Immortal
Immortal
Jump to solution

Lets start with something simple - are you able to ping your host from your workstation? Also in older versions of Putty it would not default to SSH so make sure you select SSH as your protocol because the other options the connection would be refused -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
malaysiavm
Expert
Expert
Jump to solution

you may need to check the sshd service status

enable root through SSH is not recommend

create your own ID to proceed with the SSH connection

run su - if you need to do something with root level access after you log in.

Craig

vExpert 2009

Malaysia VMware Communities -

Craig vExpert 2009 & 2010 Netapp NCIE, NCDA 8.0.1 Malaysia VMware Communities - http://www.malaysiavm.com
0 Kudos
harryc
Enthusiast
Enthusiast
Jump to solution

Once you can ping, has this server ever been reachable ?

Check the built in firewall ( escfg-firewall -q | grep ssh )

One step I always need to do is

At minimum execute the following at the CLI:

Root#> esxcfg-firewall –e sshClient

Root#> esxcfg-firewall –e sshServer

Root#> esxcfg-firewall –e ntpClient

0 Kudos
pesinet
Contributor
Contributor
Jump to solution

People i am lost. Ping is ok but i don't know how to access the console. How i check this - Check the built in firewall ( escfg-firewall -q | grep ssh )-? Sorry i am new in linux.

Thanks.

0 Kudos
harryc
Enthusiast
Enthusiast
Jump to solution

Most intel boxes have video, kb, and mouse/USB connections - some servers may have only a serial connection for the console, putty on com1 will often do the trick.

My blade servers ( Sun 6000/X6250 ) have a web interface for the console as well as tty connection from the frame, I'd wager other blade systems have something similar.

0 Kudos
depping
Leadership
Leadership
Jump to solution

Walk over to the ESX box,

type in the name(root) and password

now type the following:

nano /etc/ssh/sshd_config

scroll down til you see "PermitRootLogin" and change it to "yes"

exit nano and save the file

now type the following:

service sshd restart

try putty again.,

Duncan

VMware Communities User Moderator

-


Blogging: http://www.yellow-bricks.com

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

weinstein5
Immortal
Immortal
Jump to solution

I do not think the built in firewall is the issue because by default the port 22 (SSH) is opened - when you try to use putty do you even get asked for a user name? if not then the issue is with how you are trying to connect with putty - it can let you connect via telnet, ftp protocols which are blocked by the firewall by default - make sure putty is configured to use SSH/port 22 -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
pesinet
Contributor
Contributor
Jump to solution

ok i pressed Alt + F1 and switch to the Text Console how i go back to the Graphic Interface?

Thanks.

0 Kudos
RParker
Immortal
Immortal
Jump to solution

There is no graphic interface.

0 Kudos
pesinet
Contributor
Contributor
Jump to solution

I know, i mean i press Alt + F1 and Alt + F2 to switch between screen but in the text screen i don't know how to exit to the main screen when i started to type.

Thanks

0 Kudos
RParker
Immortal
Immortal
Jump to solution

If you type exit (and assuming you provided the root credentials by using su - ) it should take you back to a login window for another user. If you type exit again, now you should see a prompt to login. That will suffice for the 'main screen'

alternatively pressing ALT-F11 will take you back to the splash screen, but that's just a banner page. There really isn't a 'main' screen.

0 Kudos
weinstein5
Immortal
Immortal
Jump to solution

Alf-f12 will return you back

Sent from my iPhone

On Apr 22, 2009, at 9:16 AM, "pesinet" <communities-

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
pesinet
Contributor
Contributor
Jump to solution

ok, I am in etc/inetd.conf. How i go back to the root?

Thanks.

0 Kudos
RParker
Immortal
Immortal
Jump to solution

Same as windows you can do CD / or CD .. and keep doing CD .. to take you up levels to get to the one you want.

0 Kudos
RParker
Immortal
Immortal
Jump to solution

Alf-f12 will return you back

Sent from my iPhone

ALT F11 Takes you back.

ALT F12 is the diagnostic screen. Smiley Happy

0 Kudos
pesinet
Contributor
Contributor
Jump to solution

When i use PuTTY this is the error. Any idea?

Thanks

0 Kudos
Karunakar
Hot Shot
Hot Shot
Jump to solution

HI,

Try to unload your firewall in ESX,

esxcfg-firewall -u

this will allow you to access the server from putty, by default ESX will refuse any ssh connections.

-Karunakar

0 Kudos
dmaahs
Contributor
Contributor
Jump to solution

If the previous posts have not resolved your issue. Another thing to verify is your putty configuration. Older versions default to SSH v1. When you bring up putty, select the SSH item under connections. Make sure that 2 is the Preferred SSH protocol version. This is set in the sshd_config file at the top, the line 'Protocol 2'. With that, SSH-2 is the only one that will get an answer. Anything else will get denied., usually with the error you have stated.

0 Kudos