Trying to ssh on windows server using a public key authentication, but it is not recognizing the public key.

Kept the public key in .ssh/authorized_keys with proper permission.

When running in verbose mode getting below message:

debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: C:\Users\$amku001\.ssh/id_rsa
debug1: Trying private key: C:\Users\$amku001\.ssh/id_dsa
debug1: Trying private key: C:\Users\$amku001\.ssh/id_ecdsa
debug1: Trying private key: C:\Users\$amku001\.ssh/id_ed25519
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive

As can be seen it is not even offering the public RSA key. Also it is trying for private keys which doesn't exists.

1 Answer 1


It is possible that you didn't place the private key in your machine running the client-ssh.

Please confirm that you perform all the below instructions.

In order to perform ssh login using private/public key you should:

  • Create key pair (e.g. using instructions from here)

Client side:

  • Create .ssh folder in your home dir
  • Place the private key in .ssh folder
    • name it id_rsa

Server side:

  • Create .ssh folder in your home dir
  • add the content of the public key to file .ssh/authorized_keys

File permissions:

  • private key should be accessed only to you
  • public key might be read by others (but not write-able by others)
  • .ssh folder should be accessed only by you
  • When keeping the private key, It is asking for passphrase even though I have create private key without passphrase
    – Amit Kumar
    Apr 27, 2017 at 14:04
  • what is the result of running ssh with -vv ?
    – Yaron
    Apr 27, 2017 at 14:08
  • Received disconnect from 16.202.*.**: 2: Change of username or service not allowed: (asiapacific,ssh-connection) -> (asiapacific\$ amku0001,ssh-connection) Disconnected from 16.202.*.**
    – Amit Kumar
    Apr 27, 2017 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.