Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public Key Auth. failed (Windows 10 as Server) #1003

Closed
hamedsbt opened this issue Dec 24, 2017 · 5 comments
Closed

Public Key Auth. failed (Windows 10 as Server) #1003

hamedsbt opened this issue Dec 24, 2017 · 5 comments
Assignees

Comments

@hamedsbt
Copy link

"OpenSSH for Windows" version
OpenSSH_7.6, LibreSSL 2.5.3 Win32 (tested x86 & x64)

Server OperatingSystem
Windows 10 B.1703

Client OperatingSystem
Windows 10 (same device as ssh server)

What is failing
Authenticate with "publickey" not works :( several days tried

Expected output
Authenticate Success without keyboard-interactive

Actual output
2808 23:50:10:820 debug3: fd 5 is not O_NONBLOCK
2808 23:50:10:820 debug3: spawning "D:\sft\OpenSSH-Win32\sshd.exe"
2808 23:50:10:820 debug1: Forked child 1844.
1844 23:50:10:867 debug1: sshd version OpenSSH_7.6, LibreSSL 2.5.3
1844 23:50:10:867 debug1: private host key #0: ssh-rsa SHA256:gmin+8BXdmFJU7JoTQ4fOycMdDPzaLzG9hZo2KP6FOE
1844 23:50:10:883 debug1: private host key #1: ssh-dss SHA256:sLiQpAZXvTQLKg9Eb7u+NFjqum4UV35Mkv00RSzCOeo
1844 23:50:10:883 debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:ucmjxOk2iBXuQK0rtIYrY/2cfIgfio3/YUPsUEG/Gn0
1844 23:50:10:883 debug1: private host key #3: ssh-ed25519 SHA256:v6wz+gXIowVpmCGdx4SzLMFGAiVe5ELzyustgjRf6mo
1844 23:50:10:883 debug1: child socket: 448
1844 23:50:10:883 debug1: child startup_pipe: 460
1844 23:50:10:883 Connection from 127.0.0.1 port 50012 on 127.0.0.1 port 22
1844 23:50:10:883 debug1: Client protocol version 2.0; client software version PuTTY_Release_0.70
1844 23:50:10:883 debug1: no match: PuTTY_Release_0.70
1844 23:50:10:883 debug1: Local version string SSH-2.0-OpenSSH_7.6
1844 23:50:10:883 debug2: fd 3 setting O_NONBLOCK
1844 23:50:10:883 debug3: list_hostkey_types: ssh-dss key not permitted by HostkeyAlgorithms
1844 23:50:10:883 debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
1844 23:50:10:883 debug3: send packet: type 20
1844 23:50:10:883 debug1: SSH2_MSG_KEXINIT sent
1844 23:50:10:883 debug3: receive packet: type 20
1844 23:50:10:883 debug1: SSH2_MSG_KEXINIT received
1844 23:50:10:883 debug2: local server KEXINIT proposal
1844 23:50:10:883 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
1844 23:50:10:883 debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
1844 23:50:10:883 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
1844 23:50:10:883 debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
1844 23:50:10:883 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
1844 23:50:10:883 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
1844 23:50:10:883 debug2: compression ctos: none
1844 23:50:10:883 debug2: compression stoc: none
1844 23:50:10:883 debug2: languages ctos:
1844 23:50:10:883 debug2: languages stoc:
1844 23:50:10:883 debug2: first_kex_follows 0
1844 23:50:10:883 debug2: reserved 0
1844 23:50:10:883 debug2: peer client KEXINIT proposal
1844 23:50:10:883 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,rsa2048-sha256,rsa1024-sha1,diffie-hellman-group1-sha1
1844 23:50:10:883 debug2: host key algorithms: ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
1844 23:50:10:883 debug2: ciphers ctos: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,chacha20-poly1305@openssh.com,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128
1844 23:50:10:883 debug2: ciphers stoc: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,chacha20-poly1305@openssh.com,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128
1844 23:50:10:883 debug2: MACs ctos: hmac-sha2-256,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-etm@openssh.com
1844 23:50:10:883 debug2: MACs stoc: hmac-sha2-256,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-etm@openssh.com
1844 23:50:10:883 debug2: compression ctos: none,zlib
1844 23:50:10:883 debug2: compression stoc: none,zlib
1844 23:50:10:883 debug2: languages ctos:
1844 23:50:10:883 debug2: languages stoc:
1844 23:50:10:883 debug2: first_kex_follows 0
1844 23:50:10:883 debug2: reserved 0
1844 23:50:10:883 debug1: kex: algorithm: curve25519-sha256@libssh.org
1844 23:50:10:883 debug1: kex: host key algorithm: ssh-ed25519
1844 23:50:10:883 debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha2-256 compression: none
1844 23:50:10:883 debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha2-256 compression: none
1844 23:50:10:883 debug1: expecting SSH2_MSG_KEX_ECDH_INIT
1844 23:50:10:899 debug3: receive packet: type 30
1844 23:50:10:914 debug3: send packet: type 31
1844 23:50:10:914 debug3: send packet: type 21
1844 23:50:10:914 debug2: set_newkeys: mode 1
1844 23:50:10:914 debug1: rekey after 4294967296 blocks
1844 23:50:10:914 debug1: SSH2_MSG_NEWKEYS sent
1844 23:50:10:914 debug1: expecting SSH2_MSG_NEWKEYS
1844 23:50:12:602 debug3: receive packet: type 21
1844 23:50:12:602 debug1: SSH2_MSG_NEWKEYS received
1844 23:50:12:602 debug2: set_newkeys: mode 0
1844 23:50:12:602 debug1: rekey after 4294967296 blocks
1844 23:50:12:602 debug1: KEX done
1844 23:50:12:602 debug3: receive packet: type 5
1844 23:50:12:602 debug3: send packet: type 6
1844 23:50:12:603 debug3: receive packet: type 50
1844 23:50:12:603 debug1: userauth-request for user hamedsbt service ssh-connection method none
1844 23:50:12:603 debug1: attempt 0 failures 0
1844 23:50:12:603 debug2: parse_server_config: config reprocess config len 265
1844 23:50:12:605 debug2: input_userauth_request: setting up authctxt for hamedsbt
1844 23:50:12:605 debug2: input_userauth_request: try method none
1844 23:50:12:605 Failed none for hamedsbt from 127.0.0.1 port 50012 ssh2
1844 23:50:12:605 debug3: userauth_finish: failure partial=0 next methods="publickey,password,keyboard-interactive"
1844 23:50:12:605 debug3: send packet: type 51
1844 23:50:12:605 debug3: receive packet: type 50
1844 23:50:12:605 debug1: userauth-request for user hamedsbt service ssh-connection method publickey
1844 23:50:12:605 debug1: attempt 1 failures 0
1844 23:50:12:605 debug2: input_userauth_request: try method publickey
1844 23:50:12:605 debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:gmin+8BXdmFJU7JoTQ4fOycMdDPzaLzG9hZo2KP6FOE
1844 23:50:12:605 debug1: trying public key file C:\Users\Hamedsbt\.ssh/authorized_keys
1844 23:50:12:606 debug1: matching key found: file C:\Users\Hamedsbt\.ssh/authorized_keys, line 1 RSA SHA256:gmin+8BXdmFJU7JoTQ4fOycMdDPzaLzG9hZo2KP6FOE
1844 23:50:12:606 debug3: send packet: type 60
1844 23:50:12:606 debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa
1844 23:50:12:606 Postponed publickey for hamedsbt from 127.0.0.1 port 50012 ssh2
1844 23:50:12:647 debug3: receive packet: type 50
1844 23:50:12:647 debug1: userauth-request for user hamedsbt service ssh-connection method publickey
1844 23:50:12:647 debug1: attempt 2 failures 0
1844 23:50:12:647 debug2: input_userauth_request: try method publickey
1844 23:50:12:647 debug3: userauth_pubkey: have signature for RSA SHA256:gmin+8BXdmFJU7JoTQ4fOycMdDPzaLzG9hZo2KP6FOE
1844 23:50:12:647 debug1: trying public key file C:\Users\Hamedsbt\.ssh/authorized_keys
1844 23:50:12:647 debug1: matching key found: file C:\Users\Hamedsbt\.ssh/authorized_keys, line 1 RSA SHA256:gmin+8BXdmFJU7JoTQ4fOycMdDPzaLzG9hZo2KP6FOE
1844 23:50:12:668 debug1: unable to send pubkeyauth request
1844 23:50:12:668 debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa
1844 23:50:12:668 Failed publickey for hamedsbt from 127.0.0.1 port 50012 ssh2: RSA SHA256:gmin+8BXdmFJU7JoTQ4fOycMdDPzaLzG9hZo2KP6FOE
1844 23:50:12:668 debug3: userauth_finish: failure partial=0 next methods="publickey,password,keyboard-interactive"
1844 23:50:12:668 debug3: send packet: type 51
1844 23:50:12:669 debug3: receive packet: type 50
1844 23:50:12:669 debug1: userauth-request for user hamedsbt service ssh-connection method keyboard-interactive
1844 23:50:12:669 debug1: attempt 3 failures 1
1844 23:50:12:669 debug2: input_userauth_request: try method keyboard-interactive
1844 23:50:12:669 debug1: keyboard-interactive devs
1844 23:50:12:669 debug1: auth2_challenge: user=hamedsbt devs=
1844 23:50:12:669 debug1: kbdint_alloc: devices ''
1844 23:50:12:669 debug2: auth2_challenge_start: devices
1844 23:50:12:669 Failed keyboard-interactive for hamedsbt from 127.0.0.1 port 50012 ssh2
1844 23:50:12:669 debug3: userauth_finish: failure partial=0 next methods="publickey,password,keyboard-interactive"
1844 23:50:12:669 debug3: send packet: type 51
1844 23:50:15:673 Connection closed by authenticating user hamedsbt 127.0.0.1 port 50012
1844 23:50:15:673 debug1: do_cleanup

@bagajjal
Copy link
Collaborator

Looks like ssh-agent is not running..

1844 23:50:12:668 debug1: unable to send pubkeyauth request

@hamedsbt
Copy link
Author

thank you for your reply, but ssh-agent is running, I did pay attention to "unable to send pubkeyauth request" log but I could not to fix it. the "ssh-agent.log" contain error:
"cannot process request: client process is not admin or sshd"
How I can resolve it?

@bagajjal
Copy link
Collaborator

Sshd should run as Nt service/sshd or as admin.. You need to fix this..

@bagajjal
Copy link
Collaborator

Try running uninstall-sshd.ps1... Followed by install-sshd.ps1

@hamedsbt
Copy link
Author

Thank you for your support.
Finally after spending many days I'm successfully logged in via Win32-OpenSSH now I'm going to integrate it with Git on single device as Git-Server & Git-Client.
my issues resolved, Thank you!

@bagajjal bagajjal self-assigned this Dec 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants