Krede
Enthusiast
Enthusiast

ESX as a "Network UPS Tool" client

Jump to solution

Hi.

I'm having a APC UPS with USB cable connected to a Synology NAS box running "Network UPS Tool" ().

I would like my ESX 3.5 (test environment only) to act as a client to "Network UPS tool" so I (hopefully) can make the server (and VMs) shutdown after x minutes of power outages.

Should that be possible? If so, how do I configure the client part of "Network UPS tool"?

0 Kudos
1 Solution

Accepted Solutions
rriva
Expert
Expert

This is very strange ....

when you reach this point the system ask to you for a password,

debug1: Next authentication method: keyboard-interactive

I don't know your system, but with which user are you logged in ?

It doesn't seems root

netdisk> ssh 192.168.192.2 -v

I'm expecting to see something like this at the prompt:

netdisk#

and not

netdisk>

try to login as root on your netdisk machine and try to ssh esx host again, or use :

netdisk> ssh root@192.168.192.2

Riccardo Riva

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful". Thank You!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com

View solution in original post

0 Kudos
12 Replies
rriva
Expert
Expert

I don't knw NetworkUPSTools, but I usually create some script on the machine connected to the UPS and launch it after X minutes of power outages.

Ususally a use "[plink|http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html] " to execute remote command on my esx servers to shutodown all my VM and finally shutdown my esx servers

Hope to be useful.

Bye

R

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanx!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com
0 Kudos
Krede
Enthusiast
Enthusiast

My Synology NAS is running some kind of Linux, but im not able to login from that to ESX. When i try SSH from Synology I get the following error:

Permission denied (publickey,password,keyboard-interactive).

0 Kudos
rriva
Expert
Expert

You must change a line in your 7etc/sshd/sshd.config

Permit_root_login = NO

and change it to YES

(i don't have an esx under my hand to check the spell and the correct path of the file but isn't very far from what I tell you)

After that change you must restart sshd daemon with

/etc/init.d/sshd restart

then try again to login as root

Bye

R

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanx!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com
0 Kudos
Krede
Enthusiast
Enthusiast

Permit root login is already set to "Yes" because im using root account from putty on my windows host.

0 Kudos
rriva
Expert
Expert

so you can ssh your esx host from your windows client and not from another machine ?

Have you just tried to ssh your esx host from the console of your linux machine ?

It would be answer something like this :

The authenticity of host 'xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)' can't be established.

RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.

Are you sure you want to continue connecting (yes/no)?

Answer "yes" to this question and after that you must be able to connect to it with SSH.

Otherwise, are you sure that don't have a firewall in the middle (even the esx firewall itself).

Try to ssh your esx host from the linux machine and post the output.

Bye

R.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanx!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com
Krede
Enthusiast
Enthusiast

so you can ssh your esx host from your windows client and not from another machine ?

Yes

Have you just tried to ssh your esx host from the console of your linux machine ?

Im making an SSH connection to my synology box, but from there im unable to make a connection to the ESX server

It would be answer something like this :

The authenticity of host 'xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)' can't be established.

RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.

Are you sure you want to continue connecting (yes/no)?

Yes, I saw this the first time I tried from the synology box

Answer "yes" to this question and after that you must be able to connect to it with SSH.

Otherwise, are you sure that don't have a firewall in the middle (even the esx firewall itself).

Works fine from other hosts than Synology

Try to ssh your esx host from the linux machine and post the output.

Permission denied (publickey,password,keyboard-interactive).

0 Kudos
Krede
Enthusiast
Enthusiast

Output from synology when trying with the -v switch

netdisk> ssh 192.168.192.2 -v

OpenSSH_4.2p1, OpenSSL 0.9.7e 25 Oct 2004

debug1: Reading configuration data /root/.ssh/config

debug1: Connecting to 192.168.192.2 http://192.168.192.2 port 22.

debug1: Connection established.

debug1: permanently_set_uid: 0/0

debug1: identity file /root/.ssh/identity type -1

debug1: identity file /root/.ssh/id_rsa type -1

debug1: identity file /root/.ssh/id_dsa type -1

debug1: Remote protocol version 2.0, remote software version OpenSSH_3.6.1p2

debug1: match: OpenSSH_3.6.1p2 pat OpenSSH_3.*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_4.2

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: server->client aes128-cbc hmac-md5 none

debug1: kex: client->server aes128-cbc hmac-md5 none

debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

debug1: SSH2_MSG_KEX_DH_GEX_INIT sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

debug1: Host '192.168.192.2' is known and matches the RSA host key.

debug1: Found key in /root/.ssh/known_hosts:1

debug1: ssh_rsa_verify: signature correct

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: SSH2_MSG_NEWKEYS received

debug1: SSH2_MSG_SERVICE_REQUEST sent

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug1: Authentications that can continue: publickey,password,keyboard-interacti ve

debug1: Next authentication method: publickey

debug1: Trying private key: /root/.ssh/identity

debug1: Trying private key: /root/.ssh/id_rsa

debug1: Trying private key: /root/.ssh/id_dsa

debug1: Next authentication method: keyboard-interactive

debug1: Authentications that can continue: publickey,password,keyboard-interacti ve

debug1: Next authentication method: password

debug1: No more authentication methods to try.

Permission denied (publickey,password,keyboard-interactive).

netdisk>

0 Kudos
rriva
Expert
Expert

This is very strange ....

when you reach this point the system ask to you for a password,

debug1: Next authentication method: keyboard-interactive

I don't know your system, but with which user are you logged in ?

It doesn't seems root

netdisk> ssh 192.168.192.2 -v

I'm expecting to see something like this at the prompt:

netdisk#

and not

netdisk>

try to login as root on your netdisk machine and try to ssh esx host again, or use :

netdisk> ssh root@192.168.192.2

Riccardo Riva

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful". Thank You!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com

View solution in original post

0 Kudos
Krede
Enthusiast
Enthusiast

I'm using root on the synology box:

login as: root

root@netdisk's password:

BusyBox v1.1.0 (2008.03.12-11:38+0000) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

netdisk>

When using SSH i dont get the option to type password for root account on ESX.

netdisk> ssh root@192.168.192.2 -v

OpenSSH_4.2p1, OpenSSL 0.9.7e 25 Oct 2004

debug1: Reading configuration data /root/.ssh/config

debug1: Connecting to 192.168.192.2 http://192.168.192.2 port 22.

debug1: Connection established.

debug1: permanently_set_uid: 0/0

debug1: identity file /root/.ssh/identity type -1

debug1: identity file /root/.ssh/id_rsa type -1

debug1: identity file /root/.ssh/id_dsa type -1

debug1: Remote protocol version 2.0, remote software version OpenSSH_3.6.1p2

debug1: match: OpenSSH_3.6.1p2 pat OpenSSH_3.*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_4.2

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: server->client aes128-cbc hmac-md5 none

debug1: kex: client->server aes128-cbc hmac-md5 none

debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

debug1: SSH2_MSG_KEX_DH_GEX_INIT sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

debug1: Host '192.168.192.2' is known and matches the RSA host key.

debug1: Found key in /root/.ssh/known_hosts:1

debug1: ssh_rsa_verify: signature correct

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: SSH2_MSG_NEWKEYS received

debug1: SSH2_MSG_SERVICE_REQUEST sent

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug1: Authentications that can continue: publickey,password,keyboard-interacti ve

debug1: Next authentication method: publickey

debug1: Trying private key: /root/.ssh/identity

debug1: Trying private key: /root/.ssh/id_rsa

debug1: Trying private key: /root/.ssh/id_dsa

debug1: Next authentication method: keyboard-interactive

debug1: Authentications that can continue: publickey,password,keyboard-interacti ve

debug1: Next authentication method: password

debug1: No more authentication methods to try.

Permission denied (publickey,password,keyboard-interactive).

netdisk>

0 Kudos
Krede
Enthusiast
Enthusiast

I got the following message from synology:

What you are observing is a limitation of our SSH system, since we do not allow the password prompt in the command line; however a release during late Spring time should resolve this error.

Christian

0 Kudos
rriva
Expert
Expert

I'm supposing this ....

the only thing you can do now is to reconfigure SSH Daemon on your ESX to accept authentication with a certificate from your box.

Riccardo Riva

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful". Thank You!

RRiva | http://about.me/riccardoriva | http://www.riccardoriva.com
Krede
Enthusiast
Enthusiast

Can you explain me how that is done?

0 Kudos