Thursday, January 7, 2016

How to disable ssh or Esxi shell warning

Today when I tried to connect to a host using Putty, found ssh is not enabled on the host so first I enabled the ssh/remote shell access and as expected as soon as I clicked OK, there was an explanation mark on the host as well as the following warning in VM summary,
I had seen and disabled the warning many times before but still it took me some time to recall the correct option in host advanced settings so thought of making a note of it.

To suppress this warning from GUI,  what you need to do is,

Go to Host's advanced settings,
In Advanced Settings first navigate to UsrVars and then to UserVars.SuppressShellWarning
 And here change the value of UserVars.SuppressShellWarning from enable 0 to disable 1.

Click OK and you are done, the annoying warning will go away.

If you know the command you can disable the warning right from the SSH console.
To do so:

Connect to the ESXi host through SSH using root credentials and Run this command:
                              vim-cmd hostsvc/advopt/update UserVars.SuppressShellWarning long 1

 And in case if you want to enable the warning again, replace 1 with 0

                      vim-cmd hostsvc/advopt/update UserVars.SuppressShellWarning long 0

Note: As in VM settings screenshot you can see, this option disables warning for local or remote shell access so one need to make the same changes for Esxi Shell warning too.

Reference: KB# 2003637

That's it... :)

No comments:

Post a Comment