VMware Cloud Community
ArielStu
Contributor
Contributor
Jump to solution

ESXi 5.1: Lost the User and Password Authentication

Hi

After defining Public key authentication,  does not let me Logon  using User & Password by  Putty or Winscp

is there a way to be defined as both:   Public key and  User & Password ?

right now cannot access the files system

Thanks

0 Kudos
1 Solution

Accepted Solutions
schepp
Leadership
Leadership
Jump to solution

Hi,

set the ChallengeResponseAuthentication to yes.

This will allow key and password logins.

The rest can stay the way it is.

View solution in original post

0 Kudos
7 Replies
schepp
Leadership
Leadership
Jump to solution

Hi,

please post your /etc/ssh/sshd_config

When you don't edit anyting in the config file both logins should work.

Regards

0 Kudos
ArielStu
Contributor
Contributor
Jump to solution

just  leave the file empty ?

there are many parameters there,  the ESXi has the ssh enable,

thanks

0 Kudos
schepp
Leadership
Leadership
Jump to solution

No not empty. Just with the standard config it should work. AS said, post your config here so wie can take a look if you disabled password login

0 Kudos
ArielStu
Contributor
Contributor
Jump to solution

i tried to  VI   from  the vMA because   to correct the login authentication

but  ssh  root@<IP_Remote>  'vi   /etc/ssh/sshd_config'   brought the files to me into the VMA, the VI commands didn't work

So  used the scp  command to copy  the sshd_config  from ESXi to the VMA machine, then here changed it, by Winscp to copy back (here i let the password login)  

so made a mistake:  before i copied back  i  changed the sshd_config  in the remote  to  sshd_config.bak

now when i want to copy the changed sshd_config does not let me, because  cannot authenticate  ssh any more

how can i get the server ?

0 Kudos
schepp
Leadership
Leadership
Jump to solution

Enable the local console and enter the shell at the terminal:

VMware KB: Using ESXi Shell in ESXi 5.0 and 5.1

0 Kudos
ArielStu
Contributor
Contributor
Jump to solution

OK,   will access the terminal

i want to be able to login by putty using user password and  by   ssh command without asking for password

i post here the sshd_config  between lines

-----------------------------------------------------------------------------------------------

# running from inetd

# Port 2200

Protocol 2

HostKey /etc/ssh/ssh_host_rsa_key

HostKey /etc/ssh/ssh_host_dsa_key

UsePrivilegeSeparation no

SyslogFacility auth

LogLevel info

PasswordAuthentication no   # if i type here yes, or omitt the row, would it let me the ssh command access? #

PermitRootLogin yes

PrintMotd yes

PrintLastLog no

TCPKeepAlive yes

X11Forwarding no

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc

MACs hmac-sha1,hmac-sha1-96

UsePAM yes

# only use PAM challenge-response (keyboard-interactive)

ChallengeResponseAuthentication no

Banner /etc/issue

Subsystem sftp /usr/lib/vmware/openssh/bin/sftp-server

AuthorizedKeysFile /etc/ssh/keys-%u/authorized_keys

# Timeout value of 10 mins. The default value of ClientAliveCountMax is 3.

# Hence, we get a  3 * 200 = 600 seconds timeout if the client has been

# unresponsive.

ClientAliveInterval 200

0 Kudos
schepp
Leadership
Leadership
Jump to solution

Hi,

set the ChallengeResponseAuthentication to yes.

This will allow key and password logins.

The rest can stay the way it is.

0 Kudos