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

Logged out immediately after authenticating #1063

Closed
LoboMelwyn opened this issue Feb 5, 2018 · 9 comments
Closed

Logged out immediately after authenticating #1063

LoboMelwyn opened this issue Feb 5, 2018 · 9 comments

Comments

@LoboMelwyn
Copy link

When I am trying to login to sshd server from linux, I am authenticated and then is immediately logged out,
Here is the debug output

C:\Program Files\OpenSSH>sshd -d
debug1: sshd version OpenSSH_7.6, LibreSSL 2.5.3
debug1: private host key #0: ssh-rsa SHA256:cmeyzXpGz0zj9bfs2+kA6u39qvHAwYGYidW5
JRlCgdo
debug1: private host key #1: ssh-dss SHA256:SLyCBwSMjcNgw3sdh5EcFk8f1sJLL0xfE1Y+
xSvSDks
debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:00GfKzxWg7Dnq4XUx4xbyvHz
ZNUdb4hWoV3WHn8rXIs
debug1: private host key #3: ssh-ed25519 SHA256:hHTEDETW4rIa4TgLOEktAexhEflPQBpw
F+l4LEnkssQ
debug1: rexec_argv[0]='sshd'
debug1: rexec_argv[1]='-d'
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
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 10.10.0.38 port 57459 on 10.10.0.48 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup

@LoboMelwyn
Copy link
Author

FYI, I'm using Windows server 2012 R2

@bagajjal
Copy link
Collaborator

bagajjal commented Feb 5, 2018

Make sure your binary folder is read by all authenticated users

@manojampalam
Copy link
Contributor

Looks like you are not authenticated yet. Can you check if you are hitting this (documented in release notes) ?

Known Issues:
You may not be able to connect with sshd logs showing that "unable to get security token for user sshd". Please see #1053

@LoboMelwyn
Copy link
Author

Well I used older version and it worked fine with no issues, let me see I will try some other method.

@bagajjal
Copy link
Collaborator

bagajjal commented Feb 6, 2018

There are architectural changes between previous version and current version..

We suggest the new version.

@bagajjal
Copy link
Collaborator

Any update?

@bagajjal
Copy link
Collaborator

Reopen with required logs.

@DarkHack
Copy link

Have an same :
bash-4.3# /usr/sbin/sshd -d -D -f /etc/darksrv/darkpass/default/darkpass_config
debug1: sshd version OpenSSH_6.7, OpenSSL 1.0.1t 3 May 2016
debug1: private host key: #0 type 1 RSA
debug1: private host key: #1 type 2 DSA
debug1: private host key: #2 type 3 ECDSA
debug1: private host key: #3 type 4 ED25519
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[2]='-D'
debug1: rexec_argv[3]='-f'
debug1: rexec_argv[4]='/etc/darksrv/darkpass/default/darkpass_config'
debug1: Bind to port 2222 on 0.0.0.0.
Server listening on 0.0.0.0 port 2222.
debug1: Bind to port 2222 on ::.
Server listening on :: port 2222.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from 2a01:e34:edac:b260:215:afff:fea6:ab5d port 42916 on 2a01:cb10:82f5:200:d250:99ff:fe51:fd90 port 2222
debug1: Client protocol version 2.0; client software version OpenSSH_7.4p1 Debian-10+deb9u3
debug1: match: OpenSSH_7.4p1 Debian-10+deb9u3 pat OpenSSH* compat 0x04000000
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u4
debug1: permanently_set_uid: 113/65534 [preauth]
debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: client->server chacha20-poly1305@openssh.com none [preauth]
debug1: kex: server->client chacha20-poly1305@openssh.com none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
Connection closed by 2a01:e34:edac:b260:215:afff:fea6:ab5d [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 3915

Strace execution :
close(17611) = -1 EBADF (Bad file descriptor)
infinity, without connection

I'm looking for, cause in chroot environnement,
may be missing folder log, or rsyslog dev difficulty.

@bagajjal
Copy link
Collaborator

@DarkHack - as per logs, it looks like ssh client is closing the connection. It could be because there is no common protocol that both server, client can agree. share ssh client logs (ssh.exe -vvv user@ip).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants