Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ESX 3.5i and SSH

Status
Not open for further replies.

slyork

Technical User
Aug 15, 2002
36
GB
Hi Folks

We have a full 3.5 production environment, but at the moment I am playing around with 3.5i on our DMZ, after all its free now :)

I found the details about how to get to the CLI and enable SSH, but when I try and connect I still get
Network Error: Connection Refused.

\etc\inetd.conf has been edited, the comment removed from the ssh line.
The management service has been restarted using
/sbin/services.sh restart

Port 22 is enabled through our firewall to our DMZ, although I have also tried to access the servers from within the DMZ without success, the SSH client I am using is putty.


According to everything I have read SSH should now work!
But it doesn't!

Any ideas? Please!!!!
 
Can you telnet to port 22 and get a response?

--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
No, when I try, even within the dmz I get the following message.
Could not open a connection to host on port 22 : Connect failed

 
Does ESXi have the same firewall as ESX and is SSH allowed as an incoming connection on your ESXi server?

--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
Looks like ESXi has ssh disabled by default. A quick web search returned the following:


ESXi 3.5 does ship with the ability to run SSH, but this is disabled by default (and is not supported). If you just need to access the console of ESXi, then you only need to perform steps 1 - 3.

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command vi /etc/inetd.conf).
5) Find the line that begins with #ssh and remove the #. Then save the file. If you're new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file.
6) Once you've closed the vi editor, run the command /sbin/services.sh restart to restart the management services. You'll now be able to connect to the ESXi host with a SSH client.

Update for ESXi 3.5 Update 2 - With Update 2 the service.sh command no longer restarts the inetd process which enables SSH access. You can either restart your host or run ps | grep inetd to determine the process ID for the inetd process. The output of the command will be something like 1299 1299 busybox inetd, and the process ID is 1299. Then run kill -HUP <process_id> (kill -HUP 1299 in this example) and you'll then be able to access the host via SSH.
 
I was just about to reply,
'please see my original post, where I stated I had already done this'
when I noticed the last paragraph and the change that occured in Update 2, this could be the problem, will test it when I can next get to our computer room and the console (off site)

Thanks for your various replies and assistance folks.
 
Final update,

Did the ps |grep inetd then kill -hup (pid)
Worked a treat, ssh is now functioning.
Once again thanks to you all for your time and assistance.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top