VMware Cloud Community
g3uiss
Enthusiast
Enthusiast

SSH into ESXi 4.1 host using Public - Private Keys

Hi All

I am trying to setup ssh using root from the vMA, into a Esxi4.1 Host using public / private keys.

I have followed the following steps. I am still asked for root pasword

1) SSH enabled on host

2) On vMA changed to root sudo -s

3) Public / Private keys generated in default location

3) Public key copied to ESXi root/.ssh

Still root password required.

Help, Ive missed somthing !

Tony

0 Kudos
10 Replies
nielse
Expert
Expert

Are you using Windows, Linux or Mac as your computer?

How did you generate your public key?

@nielsengelen - http://foonet.be - VCP4/5
0 Kudos
g3uiss
Enthusiast
Enthusiast

Using putty on Windows to ssh into vMA

Tony

0 Kudos
nielse
Expert
Expert

If I understand correct you want to SSH from the vMA to your ESXi host?

Make sure you paste the public key under /root/.ssh/authorized_keys on your ESXi host.

Can you then try ssh -vvvv root@IP and give the output?

@nielsengelen - http://foonet.be - VCP4/5
0 Kudos
g3uiss
Enthusiast
Enthusiast

Thanks

here is the output in attched file

Tony

0 Kudos
nielse
Expert
Expert

Can you try the following on the vMA:

  1. cd ~
  2. ssh-keygen -t rsa
  3. hit enter a few times till it is done
  4. cat .ssh/id_rsa.pub
  5. Copy this on to your ESXi host in the file: /root/.ssh/authorized_keys
  6. Try logging in with ssh -vvv root@192.168.0.50
@nielsengelen - http://foonet.be - VCP4/5
0 Kudos
g3uiss
Enthusiast
Enthusiast

No Change

Thats basicly exactly what I have ben doing. Still asks for password.

Tony

0 Kudos
nielse
Expert
Expert

Are there any errors in the logs on the ESXi host? /var/log/auth.log ?

@nielsengelen - http://foonet.be - VCP4/5
0 Kudos
g3uiss
Enthusiast
Enthusiast

I havnt got a /var/log/auth ???

Tony

0 Kudos
nielse
Expert
Expert

It should be there, maybe it is in messages on ESXi 4.1. Can you double check everything in this KB (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100286...) ?

@nielsengelen - http://foonet.be - VCP4/5
0 Kudos
g3uiss
Enthusiast
Enthusiast

I have,  apart from the changes to /etc/ssh/sshd_config as I cant find that file on my esxi ?

I gues its to do with configuration file. No errors in messages

Tony

0 Kudos