PowerShell / Win32-OpenSSH

Win32 port of OpenSSH
7.35k stars 756 forks source link

Public Key Authentication Fail #878

Closed foobarberger closed 7 years ago

foobarberger commented 7 years ago

"OpenSSH for Windows" version OpenSSH_7.5p1, LibreSSL 2.5.3

Server OperatingSystem Windows Server 2012 R2 Standard

Client OperatingSystem CentOS Linux release 7.3.1611 (Core)

What is failing Public Key Logins Failing

Actual output debug2: key not found

I have faithfuly followed the installation instructions and have assured that my file permissions are correct for .ssh\authorized_keys.

I am able to log in to the windows host from a linux host as expected with username/password. No luck with Key Authentication, however.

Local (linux host) Configuation

My local .ssh/config file contains:

Host remotehostname
    HostName remotehostname
    User remoteuser
    Port 22
    IdentityFile /home/myusername/.ssh/id_dsa

The permissions in the local .ssh directory appear correct:

[me@localhost.ssh]$ ls -ltrh
total 56K
-rw------- 1 cengadmin cengadmin 1.6K Sep 11 10:01 known_hosts
-r-------- 1 cengadmin cengadmin  672 Sep 11 10:06 id_dsa
-r-------- 1 cengadmin cengadmin  580 Sep 11 10:13 config

Remote (windows host) Configuration

The .ssh directory on my remote host is as follows:

 Directory of C:\Users\REMOTEUSER\.ssh

09/11/2017  10:07 AM    <DIR>          .
09/11/2017  10:07 AM    <DIR>          ..
09/11/2017  10:07 AM               623 authorized_keys
09/11/2017  10:05 AM               672 id_dsa
09/11/2017  10:05 AM               623 id_dsa.pub
               5 File(s)          4,012 bytes
               2 Dir(s)  10,752,004,096 bytes free

C:\Users\REMOTEUSER\.ssh>icacls authorized_keys
authorized_keys NT SERVICE\sshd:(R)
                NT AUTHORITY\SYSTEM:(F)
                BUILTIN\Administrators:(F)
                FOODOM1\REMOTEUSER:(F)

C:\Users\REMOTEUSER\.ssh>icacls id_dsa
id_dsa BUILTIN\Administrators:(F)
       NT AUTHORITY\SYSTEM:(F)
       DHDOM1\REMOTEUSER:(R,W)

My authorized_keys file contains only the output of type id_dsa.pub > authorized_keys.

C:\Users\REMOTEUSER\.ssh>fc id_dsa.pub authorized_keys
Comparing files id_dsa.pub and AUTHORIZED_KEYS
FC: no differences encountered

sshd_config has PubkeyAuthentication enabled

PubkeyAuthentication yes

The configuration and permissions appear sane to me. However, I get the ubiquitous missing begin marker error I always get when I botch permissions.

sshd.log

I see: debug2: key not found

which generally means I have the wrong key in authorized_keys but I think the diff above disproves this problem.

I'm genuinely at a loss as to whether there is a bug or I am an idiot.

ssh -v output

(note that I have a other rsa keys in this directory, not included above for clarity)

$ ssh -v -i .ssh/id_dsa myhostname
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/localuser/.ssh/config
debug1: /home/localuser/.ssh/config line 21: Applying options for raleys-etl
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Hostname has changed; re-reading configuration
debug1: Reading configuration data /home/localuser/.ssh/config
debug1: /home/localuser/.ssh/config line 15: Applying options for remotehostname
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to remotehostname [00:00:00:00] port 22.
debug1: Connection established.
debug1: identity file /home/localuser/.ssh/id_dsa type -1
debug1: identity file /home/localuser/.ssh/id_dsa-cert type -1
debug1: identity file /home/localuser/.ssh/ssis_rsa type -1
debug1: identity file /home/localuser/.ssh/ssis_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5
debug1: match: OpenSSH_7.5 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-sha1-etm@openssh.com none
debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA e7:aa:c8:d4:8b:02:58:da:64:e6:18:26:d3:be:6a:b2
debug1: Host 'remotehostname' is known and matches the ECDSA host key.
debug1: Found key in /home/localuser/.ssh/known_hosts:5
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: localuser@localhost.localdomain
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering RSA public key: localuser@localhost.localdomain
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering RSA public key: localuser@localhost.localdomain
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /home/localuser/.ssh/id_dsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Received disconnect from 00:00:00:00: 2: Too many authentication failures
bagajjal commented 7 years ago

Please remove the (FOODOM1\REMOTEUSER:(F)) permissions to authorized_keys and try again. If it fails then please share sshd_logs with DEBUG3 enabled.

Your icacls should look like this, C:\Users\REMOTEUSER.ssh>icacls authorized_keys authorized_keys NT SERVICE\sshd:(R) NT AUTHORITY\SYSTEM:(F) BUILTIN\Administrators:(F)

manojampalam commented 7 years ago

@bagajjal its ok for owner (in this case remoteuser) to have allow permissions.

@foobarberger It will help if you can share traces around the following entry sshd.log debug2: key not found

Also check the encoding of authorized_keys (only ASCII and UTF-8 are supported. )

foobarberger commented 7 years ago

@manojampalam Since my last post, I discovered that I was able to successfully log in to the windows server from it's self using keys (just to add to confusion). I have attached the logs from the successful login as well.

Linux to Windows

C:\Program Files\OpenSSH>sshd.exe -dd
debug2: load_server_config: filename ./sshd_config
debug2: load_server_config: done config len = 331
debug2: parse_server_config: config ./sshd_config len 331
debug1: sshd version OpenSSH_7.5, LibreSSL 2.5.3
debug1: private host key #0: ssh-rsa SHA256:QwTN5i5KRj1N/V3elDBmFyOZy2Snv9aiMXEr+/0UDQA
debug1: private host key #1: ssh-dss SHA256:BahN99X49cQwHvreJG7ZigjF83jvmlSd28yrM4gBtYo
debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:RfYLURJW81fjfXQP7DC+G/HF+z4vDtA28udp3WlSWII
debug1: private host key #3: ssh-ed25519 SHA256:1/yPEl6gcTc3Xaep7CH2LsAoc4DfJOCIQ6Src2URx10
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug2: fd 4 setting O_NONBLOCK
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode.
Connection from 0.0.0.0 port 53827 on 10.144.19.51 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Local version string SSH-2.0-OpenSSH_7.5
debug2: fd 5 setting O_NONBLOCK
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-6
4@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-25
6-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss
debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: MACs ctos: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: MACs stoc: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1-etm@openssh.com compression: none
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1-etm@openssh.com compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_INIT
debug2: set_newkeys: mode 1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 4294967296 blocks
debug1: KEX done
debug1: userauth-request for user REMOTEUSER service ssh-connection method none
debug1: attempt 0 failures 0
debug2: parse_server_config: config reprocess config len 331
debug2: input_userauth_request: setting up authctxt for REMOTEUSER
debug2: input_userauth_request: try method none
Failed none for REMOTEUSER from 0.0.0.0 port 53827 ssh2
debug1: userauth-request for user REMOTEUSER service ssh-connection method publickey
debug1: attempt 1 failures 0
debug2: input_userauth_request: try method publickey
debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:O2ratkb64QNx18+9XOeNBehFYeVf4UNGPXcYTaBWyRc
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug2: user_key_allowed: check options: 'ssh-dss fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjS
pQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST
'
debug2: user_key_allowed: advance: 'fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: key not found
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa
Failed publickey for REMOTEUSER from 0.0.0.0 port 53827 ssh2
debug1: userauth-request for user REMOTEUSER service ssh-connection method publickey
debug1: attempt 2 failures 1
debug2: input_userauth_request: try method publickey
debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:PfUk6H++dvRUOSzs2gHQOU1U3STptaH0lWRGPIkXr3I
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug2: user_key_allowed: check options: 'ssh-dss fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: user_key_allowed: advance: 'fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug1: matching key found: file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys, line 3 RSA SHA256:PfUk6H++dvRUOSzs2gHQOU1U3STptaH0lWRGPIkXr3I
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa Postponed publickey for REMOTEUSER from 0.0.0.0 port 53827 ssh2
debug1: userauth-request for user REMOTEUSER service ssh-connection method publickey
debug1: attempt 3 failures 1
debug2: input_userauth_request: try method publickey
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug2: user_key_allowed: check options: 'ssh-dss fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGD rH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: user_key_allowed: advance: 'fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug1: matching key found: file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys, line 3 RSA SHA256:PfUk6H++dvRUOSzs2gHQOU1U3STptaH0lWRGPIkXr3I
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa
Failed publickey for REMOTEUSER from 0.0.0.0 port 53827 ssh2: RSA SHA256:PfUk6H++dvRUOSzs2gHQOU1U3STptaH0lWRGPIkXr3I
debug1: userauth-request for user REMOTEUSER service ssh-connection method publickey
debug1: attempt 4 failures 2
debug2: input_userauth_request: try method publickey
debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:JDuzMdAfTlbs7IRtwEyugqX7J0Zy8QIyTeFLNdQ+0DE
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug2: user_key_allowed: check options: 'ssh-dss fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: user_key_allowed: advance: 'fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: key not found
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa Failed publickey for REMOTEUSER from 0.0.0.0 port 53827 ssh2
debug1: userauth-request for user REMOTEUSER service ssh-connection method publickey
debug1: attempt 5 failures 3
debug2: input_userauth_request: try method publickey
debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:k6vEnEYEfIsiTPoIuVRNF3pul+V4qfA8AE/P1lSWln0
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug2: user_key_allowed: check options: 'ssh-dss fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: user_key_allowed: advance: 'fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: key not found
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa Failed publickey for REMOTEUSER from 0.0.0.0 port 53827 ssh2
debug1: userauth-request for user REMOTEUSER service ssh-connection method publickey
debug1: attempt 6 failures 4
debug2: input_userauth_request: try method publickey
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug1: matching key found: file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys, line 1 DSA SHA256:M2U+jucArRIamhQf76ed9nJFTQuNDm4bMu8dJ2pceaM
debug2: userauth_pubkey: authenticated 0 pkalg ssh-dss Failed publickey for REMOTEUSER from 0.0.0.0 port 53827 ssh2: DSA SHA256:M2U+jucArRIamhQf76ed9nJFTQuNDm4bMu8dJ2pceaM
debug1: userauth-request for user REMOTEUSER service ssh-connection method keyboa rd-interactive
debug1: attempt 7 failures 5
debug2: input_userauth_request: try method keyboard-interactive
debug1: keyboard-interactive devs
debug1: auth2_challenge: user=REMOTEUSER devs=
debug1: kbdint_alloc: devices ''
debug2: auth2_challenge_start: devices Failed keyboard-interactive for REMOTEUSER from 0.0.0.0 port 53827 ssh2 Connection closed by authenticating user REMOTEUSER 0.0.0.0 port 53827
debug1: do_cleanup

Successful Windows localhost login

C:\Program Files\OpenSSH>sshd.exe -dd
debug2: load_server_config: filename ./sshd_config
debug2: load_server_config: done config len = 331
debug2: parse_server_config: config ./sshd_config len 331
debug1: sshd version OpenSSH_7.5, LibreSSL 2.5.3
debug1: private host key #0: ssh-rsa SHA256:QwTN5i5KRj1N/V3elDBmFyOZy2Snv9aiMXEr+/0UDQA
debug1: private host key #1: ssh-dss SHA256:BahN99X49cQwHvreJG7ZigjF83jvmlSd28yrM4gBtYo
debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:RfYLURJW81fjfXQP7DC+G/HF+z4vDtA28udp3WlSWII
debug1: private host key #3: ssh-ed25519 SHA256:1/yPEl6gcTc3Xaep7CH2LsAoc4DfJOCIQ6Src2URx10
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug2: fd 4 setting O_NONBLOCK
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode. Connection from fe80::7973:e2cd:d008:59de%12 port 58062 on fe80::7973:e2cd:d008:59de%12 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.5
debug1: match: OpenSSH_7.5 pat OpenSSH* compat 0x04000000
debug1: Local version string SSH-2.0-OpenSSH_7.5
debug2: fd 5 setting O_NONBLOCK
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-6
4@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_INIT
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: KEX done
debug1: userauth-request for user remoteuser@mydom service ssh-connection method none
debug1: attempt 0 failures 0
debug2: parse_server_config: config reprocess config len 331
debug2: input_userauth_request: setting up authctxt for remoteuser@mydom
debug2: input_userauth_request: try method none Failed none for remoteuser@mydom from fe80::7973:e2cd:d008:59de%12 port 58062 ssh2
debug1: userauth-request for user remoteuser@mydom service ssh-connection method publickey
debug1: attempt 1 failures 0
debug2: input_userauth_request: try method publickey
debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:fauxsha
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug2: user_key_allowed: check options: 'ssh-dss fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: user_key_allowed: advance: 'fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug1: matching key found: file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys, line 2 RSA SHA256:fauxsha
debug2: userauth_pubkey: authenticated 0 pkalg rsa-sha2-512 Postponed publickey for remoteuser@mydom from fe80::7973:e2cd:d008:59de%12 port 58062 ssh2
debug1: userauth-request for user remoteuser@mydom service ssh-connection method publickey
debug1: attempt 2 failures 0
debug2: input_userauth_request: try method publickey
debug1: trying public key file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys
debug2: user_key_allowed: check options: 'ssh-dss fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug2: user_key_allowed: advance: 'fakeypants+mcfakekey/ofliesville/CGYlE77jzjaX1D0KYlAM8Z2b/h/KaB564K8FsHxr+L7s6RGwCDiBZvNSV4B7ckJaYHaBmOkq2Z91esQmwFwDzearmTu8Fis4AAACBAIK4qJNFUnrflfx4cW8mjSpQJj1zZZrwzX5cfAyC2zn+Yh3YbWqI+M9OJK097JS3FGNi6BpAcmZ3S7zOCNRpAhEayMIXy3N4p/lSGDrH4Le1i8dF69uEB/6P+fVd52VbUl4oGNlFdprBat0KItnzxrflvnoIT9lUt4WCp08LgqtT remoteuser@mydom@REMOTEHOST'
debug1: matching key found: file C:\\Users\\REMOTEUSER\\.ssh/authorized_keys, line 2 RSA SHA256:fauxsha
debug2: userauth_pubkey: authenticated 1 pkalg rsa-sha2-512 Accepted publickey for remoteuser@mydom from fe80::7973:e2cd:d008:59de%12 port 58062 ssh2: RSA SHA256:fauxsha
debug1: Entering interactive session for SSH2.
debug2: fd 6 setting O_NONBLOCK
debug2: fd 7 setting O_NONBLOCK
debug1: server_init_dispatch
debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug2: session_new: allocate (allocated 0 max 10)
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
debug1: server_input_channel_req: channel 0 request pty-req reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
debug1: Allocating pty.
debug1: session_pty_req: session 0 alloc console
debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
Starting session: shell on console for remoteuser@mydom from fe80::7973:e2cd:d00
8:59de%12 port 58062 id 0
debug2: fd 8 setting O_NONBLOCK
debug2: fd 9 setting O_NONBLOCK
debug2: fd 10 setting O_NONBLOCK
debug2: fd 11 setting O_NONBLOCK
debug2: fd 12 setting O_NONBLOCK
debug2: fd 13 setting O_NONBLOCK
debug1: Executing command: C:\\Program Files\\OpenSSH\\ssh-shellhost.exe
debug2: fd 5 setting TCP_NODELAY
debug2: channel 0: rfd 10 isatty
foobarberger commented 7 years ago

@manojampalam I avoid using any text editor when dealing with authorized_keys , and so used type id_dsa.pub > authorized_keys to create it. Will type alter the encoding? Sorry, not a windows guy.

I used Get-Content and Set-Content in powershell to set encoding from ANSI to utf-8, but noticed no changes in behavior or in logs.

JW0914 commented 7 years ago

@foobarberger Please post your client ssh log [debug2] from Linux

foobarberger commented 7 years ago

@JW0914 client ssh log

OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/me/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to remotehost [00.00.00.00] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load ".ssh/test-host_rsa" as a RSA1 public key
debug1: identity file .ssh/test-host_rsa type -1
debug1: identity file .ssh/test-host_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5
debug1: match: OpenSSH_7.5 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "remotehost" from file "/home/me/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/me/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: kex_parse_kexinit: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: setup hmac-sha1-etm@openssh.com
debug1: kex: server->client aes128-ctr hmac-sha1-etm@openssh.com none
debug2: mac_setup: setup hmac-sha1-etm@openssh.com
debug1: kex: client->server aes128-ctr hmac-sha1-etm@openssh.com none
debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA e7:aa:c8:d4:8b:02:58:da:64:e6:18:26:d3:be:6a:b2
debug3: load_hostkeys: loading entries for host "remotehost" from file "/home/me/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/me/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "00.00.00.00" from file "/home/me/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/me/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug1: Host 'remotehost' is known and matches the ECDSA host key.
debug1: Found key in /home/me/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: me@myhost.localdomain (0x7fbefc2a5b30),
debug2: key: me@myhost.localdomain (0x7fbefc2a5ce0),
debug2: key: me@myhost.localdomain (0x7fbefc2aa3a0),
debug2: key: me@myhost.localdomain (0x7fbefc2aa6d0),
debug2: key: .ssh/test-host_rsa ((nil)), explicit
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred gssapi-keyex,gssapi-with-mic,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: me@myhost.localdomain
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering RSA public key: me@myhost.localdomain
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp f3:26:a5:58:fa:22:af:36:34:92:46:38:b2:57:d9:2b
debug3: sign_and_send_pubkey: RSA f3:26:a5:58:fa:22:af:36:34:92:46:38:b2:57:d9:2b
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering RSA public key: me@myhost.localdomain
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering RSA public key: me@myhost.localdomain
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: .ssh/test-host_rsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA 36:3a:af:27:d4:81:5f:39:2e:df:40:c5:a3:b8:16:e6
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: userauth_kbdint: disable: no info_req_seen
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: 
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
debug3: packet_send2: adding 48 (len 61 padlen 19 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to remotehost ([00.00.00.00]:22).
debug2: fd 5 setting O_NONBLOCK
debug3: fd 6 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug3: Ignored env XDG_VTNR
debug3: Ignored env MATE_DESKTOP_SESSION_ID
debug3: Ignored env SSH_AGENT_PID
debug3: Ignored env XDG_SESSION_ID
debug3: Ignored env HOSTNAME
debug3: Ignored env SPARK_HOME
debug3: Ignored env XDG_GREETER_DATA_DIR
debug3: Ignored env GPG_AGENT_INFO
debug3: Ignored env TERM
debug3: Ignored env SHELL
debug3: Ignored env VTE_VERSION
debug3: Ignored env HISTSIZE
debug3: Ignored env WINDOWID
debug3: Ignored env GNOME_KEYRING_CONTROL
debug3: Ignored env USER
debug3: Ignored env http_proxy
debug3: Ignored env LS_COLORS
debug3: Ignored env XDG_SESSION_PATH
debug3: Ignored env XDG_SEAT_PATH
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env SESSION_MANAGER
debug3: Ignored env PATH
debug3: Ignored env MAIL
debug3: Ignored env DESKTOP_SESSION
debug3: Ignored env PWD
debug3: Ignored env JAVA_HOME
debug1: Sending env LANG = en_US.utf8
debug2: channel 0: request env confirm 0
debug3: Ignored env PYTHONSTARTUP
debug3: Ignored env GDM_LANG
debug3: Ignored env https_proxy
debug3: Ignored env GDMSESSION
debug3: Ignored env HISTCONTROL
debug3: Ignored env HOME
debug3: Ignored env XDG_SEAT
debug3: Ignored env SHLVL
debug3: Ignored env no_proxy
debug3: Ignored env GTK_OVERLAY_SCROLLING
debug3: Ignored env LOGNAME
debug3: Ignored env PYTHONPATH
debug3: Ignored env DBUS_SESSION_BUS_ADDRESS
debug3: Ignored env LESSOPEN
debug3: Ignored env XDG_RUNTIME_DIR
debug3: Ignored env DISPLAY
debug3: Ignored env XDG_CURRENT_DESKTOP
debug3: Ignored env COLORTERM
debug3: Ignored env XAUTHORITY
debug3: Ignored env _
debug3: Ignored env OLDPWD
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Microsoft Windows [Version 6.3.9600]                                            
(c) 2013 Microsoft Corporation. All rights reserved.                            

remoteuser@REMOTEHOST C:\Users\REMOTEUSER>                                   e                                  x                                 i                                t                               debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: rcvd close
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)

debug1: fd 1 clearing O_NONBLOCK
debug3: fd 2 is not O_NONBLOCK
Connection to remotehost closed.
Transferred: sent 6456, received 4920 bytes, in 31.6 seconds
Bytes per second: sent 204.2, received 155.6
debug1: Exit status 0
foobarberger commented 7 years ago

@manojampalam @JW0914 I have also tried building the latest version of OpenSSH Portable Release from deraadtco while reading Cerebus and eating poutine for the full Canadian. No significant differences in logging output.

[me@localhost ~]$ ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013
[me@localhost openssh-7.5p1]$ ./ssh -V
OpenSSH_7.5p1, OpenSSL 1.0.1e-fips 11 Feb 2013
JW0914 commented 7 years ago

@foobarberger You're issue appears to be stemming from the following error:

There's a handful of things that can cause this, and while I'll list the few I know of here, it will also be best to google the above error. Possible causes:

foobarberger commented 7 years ago

@JW0914 Yeah, I pointed that out earlier, and have already checked everything you've pointed out. The fact that I can successfully log in using keys from a windows host, and my linux hosts are working properly for other systems is making me suspect there is either something subtle going on in the configuration, or there is a bug that I lack the expertise to uncover. Either way, time constraints do not allow me any more time to work with this particular port. Thanks very much for your time.

JW0914 commented 7 years ago

@foobarberger If you haven't already, google the error message that appears to be causing this: key_parse_private2: missing begin marker

Also, this may not occur on Server 2012, but it does in Windows 10, so also verify inheritance has actually been disabled for the aforementioned files and directories in my prior post.