
Try removing permissions for user: S-1-9-22 on file C:/ProgramData/ssh/administrators_authorized_keys. ssh/authorized_keys file to /ProgramData/ssh/administrators_authorized_keys, and restarted the server. I am in the Administrators group, and sshd_config has a special stanza for us folks. The debug log said: … debug1: trying public key file _PROGRAMDATA_/ssh/administrators_authorized_keysĪh, so not. I had two problems: Problem 1: The correct authorized_keys file Just look in the log file after you have attempted to ssh into the machine.
#OPENSSH WINDOWS SERVER 2012 FULL#
Now you will find full debug info is being written to /ProgramData/ssh/logs/sshd.log.

Just spent a couple of hours debugging this. Received disconnect from 00:00:00:00: 2: Too many authentication failures
#OPENSSH WINDOWS SERVER 2012 SOFTWARE#
ssh/id_dsa myhostnameĭebug1: Reading configuration data /home/localuser/.ssh/configĭebug1: /home/localuser/.ssh/config line 21: Applying options for raleys-etlĭebug1: Reading configuration data /etc/ssh/ssh_configĭebug1: /etc/ssh/ssh_config line 56: Applying options for *ĭebug1: Hostname has changed re-reading configurationĭebug1: /home/localuser/.ssh/config line 15: Applying options for remotehostnameĭebug1: Connecting to remotehostname port 22.ĭebug1: identity file /home/localuser/.ssh/id_dsa type -1ĭebug1: identity file /home/localuser/.ssh/id_dsa-cert type -1ĭebug1: identity file /home/localuser/.ssh/ssis_rsa type -1ĭebug1: identity file /home/localuser/.ssh/ssis_rsa-cert type -1ĭebug1: Enabling compatibility mode for protocol 2.0ĭebug1: Local version string SSH-2.0-OpenSSH_6.6.1ĭebug1: Remote protocol version 2.0, remote software version OpenSSH_7.5ĭebug1: match: OpenSSH_7.5 pat OpenSSH* compat 0x04000000ĭebug1: kex: server->client aes128-ctr noneĭebug1: kex: client->server aes128-ctr noneĭebug1: expecting SSH2_MSG_KEX_ECDH_REPLYĭebug1: Server host key: ECDSA e7:aa:c8:d4:8b:02:58:da:64:e6:18:26:d3:be:6a:b2ĭebug1: Host 'remotehostname' is known and matches the ECDSA host key.ĭebug1: Found key in /home/localuser/.ssh/known_hosts:5ĭebug1: ssh_ecdsa_verify: signature correctĭebug1: Authentications that can continue: publickey,password,keyboard-interactiveĭebug1: Next authentication method: publickeyĭebug1: Offering RSA public key: Authentications that can continue: publickey,password,keyboard-interactiveĭebug1: Trying private key: /home/localuser/.ssh/id_dsaĭebug1: key_parse_private2: missing begin markerĭebug1: read PEM private key done: type DSAĭebug1: Next authentication method: keyboard-interactive (note that I have a other rsa keys in this directory, not included above for clarity) $ ssh -v -i. Which generally means I have the wrong key in authorized_keys but I think the diff above disproves this problem.Ĭlues? Be gentle, I've not used Windows in anger in nearly 10 years. However, I get the ubiquitous missing begin marker error I always get when I botch permissions. The configuration and permissions appear sane to me. Sshd_config has PubkeyAuthentication enabled PubkeyAuthentication yes C:\Users\REMOTEUSER\.ssh>fc id_dsa.pub authorized_keysĬomparing files id_dsa.pub and AUTHORIZED_KEYS My authorized_keys file contains only the output of type id_dsa.pub > authorized_keys. ssh directory on my remote host is as follows: Directory of C:\Users\REMOTEUSER\.sshĬ:\Users\REMOTEUSER\.ssh>icacls authorized_keys r- 1 cengadmin cengadmin 580 Sep 11 10:13 config

r- 1 cengadmin cengadmin 672 Sep 11 10:06 id_dsa rw- 1 cengadmin cengadmin 1.6K Sep 11 10:01 known_hosts IdentityFile /home/myusername/.ssh/id_dsa ssh/config file contains: Host remotehostname No luck with Key Authentication, however. I am able to log in to the windows host from a linux host as expected with username/password. (Can't post link to the specific instructions in the Win32-OpenSSH wiki, since I'm too little to post more than two links, see comment below). I have faithfuly followed the installation instructions and have assured that my file permissions are correct for. I have been attempting to get Public Key Authentication working with the PowerShell port of OpenSSH onto a VM running Windows Server 2012 R2.
