ssh - Setting up OpenSSH for Windows using public key authentication -


i having issues setting openssh windows, using public key authentication.

i have working on local desktop , can ssh key unix machines or other openssh windows machines.

i have replicated build onto server, can password authentication working fine, when use keys following issue:

debug1: authentications can continue: publickey,password,keyboard-interactive debug3: start over, passed different list publickey,password,keyboard-interactive debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: next authentication method: publickey debug1: offering rsa public key: /cygdrive/c/sshusers/jsadmint2232/.ssh/id_rsa debug3: send_pubkey_test debug2: sent publickey packet, wait reply connection closed 127.0.0.1 

so purposes of testing, have been trying ssh localhost, when tried remotely same issue.

even more strange, when have both password & public key enabled in sshd_config, attempt use keys , bomb out above message , won't try use password.

here steps have taken:

  1. install openssh windows
  2. mkgroup -l >>..\etc\group (added local groups)
  3. mkgroup -d >>..\etc\group (added domain groups)
  4. mkpasswd -l -u openssh >>..\passwd (added local user)
  5. mkpasswd -d -u jsadmint2232 >>..\passwd (added domain user)
  6. edited homedir in passwd point c:\sshusers\%user% - %user% user name
  7. enabled password auth, disabled key auth
  8. created ssh keys both jsadmint2232 / openssh , ensured files created in homedirs
  9. added authorized_keys files .ssh dirs each user , added keys incoming connecting users
  10. net stop opensshd / net start opensshd
  11. test password auth works both locally , remotely
  12. updated sshd_config, enabled key auth - restart opensshd
  13. test connection , above error, doesn't try password auth?
  14. updated sshd_config, disable password auth - restart opensshd
  15. test connection , still above error

it appears server killing connection reason?

i have solved issue...

it related account started service - using local system account - stopping accessing pub key , authorized_keys file.

once stopped service , started user trying connect into, worked!

so basically, need start service account , external users connect in user.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -