[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh disconnects immediately after successful login



On 12/16/2015 06:54 PM, Kent West wrote:
westk@westek:~$ cat /etc/debian_version
stretch/sid

So, Debian Testing (Stretch).


You have a newer version of openssh-server (1:6.9p1-3) than I do (1:6.7p1-5). Check your 'man sshd_config' carefully.


Kents-MacBook-Pro:~ westk$ ssh -vvv westk@westek.acu.edu
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
...
westk@westek.acu.edu's password:
debug3: packet_send2: adding 64 (len 58 padlen 6 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to westek.acu.edu ([150.252.155.27]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
   #0 client-session (t3 r-1 i0/0 o0/0 fd 5/6 cc -1)

Connection to westek.acu.edu closed by remote host.
Connection to westek.acu.edu closed.
Transferred: sent 2208, received 1696 bytes, in 0.0 seconds
Bytes per second: sent 68746.8, received 52805.5
debug1: Exit status -1
...
westk@westek:~$ sudo tail /var/log/auth.log
Dec 16 20:51:53 westek sshd[17550]: Accepted password for westk from
50.26.189.223 port 60677 ssh2
Dec 16 20:51:53 westek sshd[17550]: pam_unix(sshd:session): session
opened for user westk by (uid=0)
Dec 16 20:51:53 westek systemd-logind[733]: New session c70 of user westk.
Dec 16 20:51:53 westek sshd[17550]: pam_unix(sshd:session): session
closed for user westk
Dec 16 20:51:53 westek systemd-logind[733]: Removed session c70.

As you said, you get in and then you're kicked out.


Is the FQDN form required from the remote host?

    ssh westk@westek.acu.edu


What happens if you use the FQDN from from a host on the same LAN segment as the destination?


What about shorter forms from both locations?

	ssh westk@westek

	ssh westek


A trouble-shooting idea -- capture the output of 'ssh -vvv ...' into text files for a failure and for a success, and then 'diff' the two files.


Another thought -- there are two Auth* words: Authentication and Authorization. It looks like remote login passes the first, but fails the second. Any ideas why?


A possible work-around -- put your SSH public key on the remote host into the authorized_keys file on the destination host and see what happens.


westk@westek:~$ sudo tail -20 /var/log/syslog
...
Dec 16 20:51:19 westek systemd[1]: Started Session c69 of user westk.
Dec 16 20:51:19 westek console-kit-daemon[1519]: (process:17541):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Dec 16 20:51:19 westek console-kit-daemon[1519]: missing action
Dec 16 20:51:19 westek console-kit-daemon[1519]: (process:17546):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Dec 16 20:51:19 westek console-kit-daemon[1519]: missing action
Dec 16 20:51:19 westek console-kit-daemon[1519]:
console-kit-daemon[1519]: GLib-CRITICAL: Source ID 1421 was not found
when attempting to remove it
Dec 16 20:51:19 westek console-kit-daemon[1519]: GLib-CRITICAL: Source
ID 1421 was not found when attempting to remove it
Dec 16 20:51:53 westek systemd[1]: Started Session c70 of user westk.
Dec 16 20:51:53 westek console-kit-daemon[1519]: (process:17553):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Dec 16 20:51:53 westek console-kit-daemon[1519]: missing action
Dec 16 20:51:53 westek console-kit-daemon[1519]: (process:17558):
GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Dec 16 20:51:53 westek console-kit-daemon[1519]: missing action
Dec 16 20:51:53 westek console-kit-daemon[1519]: GLib-CRITICAL: Source
ID 1439 was not found when attempting to remove it
Dec 16 20:51:53 westek console-kit-daemon[1519]:
console-kit-daemon[1519]: GLib-CRITICAL: Source ID 1439 was not found
when attempting to remove it

The console-kit-daemon error messages look to be independent of the sshd remote login issue (?).


I wonder if it possible to start another instance of sshd on another port with debugging enabled and test that?


David


Reply to: