Symptoms
Unable to add the ESXi host to vCenter Server Cannot connect to the ESXi host using SSH Connecting to the ESXi host using SSH fails You see the error:Cannot contact the specified host (IP Address/hostname). The host may not be available on the network, a network configuration problem may exist. or the management service on this host may not be responding. Cannot connect to the ESXi host using putty When connecting to the ESXi host using putty, you see the error:Network error: Connection Refused You have enabled Tech Support Mode. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910).
Cause
This issue may occur if the /etc/inetd.conf file is empty or does not contain the correct settings for remote shell access and VMware authentication daemon. Note: In ESXi 5.x and 6.0, the inetd.conf file is located at /var/run/.
Resolution
To resolve this issue: Connect to the ESXi console directly using KVM session , such as iLO, iLOM, DRAC, RSA, or IP KVM, press ALT+F1, and then log in as root. Open the inetd.conf file using a text editor.To open the file using the vi editor, run this command:# vi /etc/inetd.conf Ensure that the contents of the /etc/inetd.conf file are similar to: # Internet server configuration database # Remote shell access ssh stream tcp nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i -K60 ssh stream tcp6 nowait root /sbin/dropbearmulti dropbear ++min=0,swap,group=shell -i -K60 In ESXi 5.x, the contents under Remote shell access appear similar to:ssh stream tcp nowait root /usr/lib/vmware/openssh/bin/sshd sshd ++swap,group=host/vim/vimuser/terminal/ssh -issh stream tcp6 nowait root /usr/lib/vmware/openssh/bin/sshd sshd ++swap,group=host/vim/vimuser/terminal/ssh -i # VMware authentication daemon authd stream tcp nowait root /sbin/authd authd authd stream tcp6 nowait root /sbin/authd authd Save the changes made to the file.Note: Alternatively, you can copy the inetd.conf file from a good known ESXi host using a utility such as WinSCP. Run this command to restart the SSH daemon for the changes to take effect:# /etc/init.d/TSM-SSH restart Note: In ESXi 5.x, run this command:/etc/init.d/SSH restart
Related Information
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.xSSH を使用した ESXi ホストへの接続が次のエラーで失敗する:ネットワーク エラー: 接続が拒否されました使用 SSH 连接到 ESXi 主机失败,并显示以下错误:网络错误: 连接被拒绝