You are not logged in.

#1 2012-11-10 02:33:38

mathieui
Member
Registered: 2009-07-21
Posts: 38
Website

SSH: No interactive session

I have been using arch on my server for some years, now, and it worked great, but around a few weeks/months ago (I can’t pinpoint the date/upgrade), ssh stopped working properly.

I can always log in just fine (server logs confirm that), but I only get a “real” interactive session once in a while (meaning, a prompt), the other times I am logged and I can send commands to the server (even ^D), as if I had a shell, but no output is displayed.

Moreover, the output of ssh -v is strictly the same (ips, hostname and keys removed):
A working session:

prompt% ssh user@server -v
OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to server [ipv6] port 22.
debug1: Connection established.
debug1: identity file /home/mathieui/.ssh/id_rsa type 1
debug1: identity file /home/mathieui/.ssh/id_rsa-cert type -1
debug1: identity file /home/mathieui/.ssh/id_dsa type -1
debug1: identity file /home/mathieui/.ssh/id_dsa-cert type -1
debug1: identity file /home/mathieui/.ssh/id_ecdsa type -1
debug1: identity file /home/mathieui/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.1
debug1: match: OpenSSH_6.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA key
debug1: Host 'server' is known and matches the ECDSA host key.
debug1: Found key in /home/mathieui/.ssh/known_hosts:3
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/mathieui/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to server ([ipv6]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
Last login: Sat Nov 10 02:47:49 from client
[mathieui@theguardian ~] % 
…

A buggy session:

prompt% ssh user@server -v
OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to server [ipv6] port 22.
debug1: Connection established.
debug1: identity file /home/mathieui/.ssh/id_rsa type 1
debug1: identity file /home/mathieui/.ssh/id_rsa-cert type -1
debug1: identity file /home/mathieui/.ssh/id_dsa type -1
debug1: identity file /home/mathieui/.ssh/id_dsa-cert type -1
debug1: identity file /home/mathieui/.ssh/id_ecdsa type -1
debug1: identity file /home/mathieui/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.1
debug1: match: OpenSSH_6.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA key
debug1: Host 'server' is known and matches the ECDSA host key.
debug1: Found key in /home/mathieui/.ssh/known_hosts:3
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/mathieui/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to server ([ipv6]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.

As you can see, no difference, except that I don’t get a prompt in the second case, and it hangs at that point, before I type in exit or ^D (or whatever closes the zsh open on the server).

Any help would be appreciated, because I am currently firing dozens of ssh at the same time in order to have one with a prompt (end even with tmux, that isn’t pleasant).

Last edited by mathieui (2012-11-10 23:41:23)

Offline

#2 2012-11-10 12:44:32

oeufcoque
Member
Registered: 2012-11-09
Posts: 19
Website

Re: SSH: No interactive session

Try with more "-v" flags to ssh and see if that may reveal something

If you have a custom .zshrc and .zprofile I would suggest you move them temporary to see if something in them are causing the issue

Offline

#3 2012-11-10 14:45:05

mathieui
Member
Registered: 2009-07-21
Posts: 38
Website

Re: SSH: No interactive session

oeufcoque wrote:

Try with more "-v" flags to ssh and see if that may reveal something

If you have a custom .zshrc and .zprofile I would suggest you move them temporary to see if something in them are causing the issue

Right, I forgot to mention that I tried with bash (no custom bashrc/_profile) and a bare zsh, with the same results.

ssh -vv yields some interesting info, the handshake, etc is the same, but at the end, after both cases get a

debug2: shell request accepted on channel 0

The successful one gets the “Last login […]” and then the prompt, but the failed one has five more lines:

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

Does that mean that the server sends EOF once the connexion is established in most cases?

Last edited by mathieui (2012-11-10 23:13:36)

Offline

#4 2012-11-24 17:20:27

cippaciong
Member
Registered: 2010-06-21
Posts: 104
Website

Re: SSH: No interactive session

I had the same problem on an arch installation some months ago and I couldn't fine any solution. Now the same is happening on a test server running in virtualbox. I can connect without any problem using the command

ssh user@192.168.0.x

but if I try to use

ssh user@mydomain.com

I obtain the same issue you have. Also the output of ssh -v is the same as yours.
Did you found any solution?

Offline

#5 2013-08-25 18:08:36

aintemail-al
Member
Registered: 2012-07-03
Posts: 6

Re: SSH: No interactive session

The same here.
Can connect the server, logs in but no prompt at the client side.
Here the output:

ssh -v root@192.168.11.3
OpenSSH_6.2p2, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 192.168.11.3 [192.168.11.3] port 22.
debug1: Connection established.
debug1: identity file /home/nolby/.ssh/id_rsa type -1
debug1: identity file /home/nolby/.ssh/id_rsa-cert type -1
debug1: identity file /home/nolby/.ssh/id_dsa type -1
debug1: identity file /home/nolby/.ssh/id_dsa-cert type -1
debug1: identity file /home/nolby/.ssh/id_ecdsa type -1
debug1: identity file /home/nolby/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 78:74:ef:d4:5b:a9:d4:a4:f9:9b:fc:da:87:f5:97:e1
debug1: Host '192.168.11.3' is known and matches the ECDSA host key.
debug1: Found key in /home/nolby/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/nolby/.ssh/id_rsa
debug1: Trying private key: /home/nolby/.ssh/id_dsa
debug1: Trying private key: /home/nolby/.ssh/id_ecdsa
debug1: Next authentication method: password
root@192.168.11.3's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.11.3 ([192.168.11.3]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: channel 0: free: client-session, nchannels 1

Nothing more to see but the black screen.
The curious thing is that I *can* execute commands on the server through ssh.
If I send

ssh -v root@192.168.11.3 'systemctl poweroff'

the server ask me the password and then poweroff.
Have no idea really, any help appreciated.

Offline

#6 2013-08-29 20:53:33

cippaciong
Member
Registered: 2010-06-21
Posts: 104
Website

Re: SSH: No interactive session

Are you using ssh keys or plain login to connect to your server?

Offline

#7 2013-08-30 08:53:38

aintemail-al
Member
Registered: 2012-07-03
Posts: 6

Re: SSH: No interactive session

cippaciong wrote:

Are you using ssh keys or plain login to connect to your server?

Plain login, I tip the password (see the output posted).

Offline

#8 2013-08-30 09:04:28

cippaciong
Member
Registered: 2010-06-21
Posts: 104
Website

Re: SSH: No interactive session

When I had this problem I asked on the openssh IRC channel but they didn't know what could cause it either. The said by the way that other people reported this problem that seems to be affecting only Arch. I personally "solved" the issue using ssh keys instead of plain login. Try this way and let us know if it works for you too. If this is the case maybe we should open a bug in the Arch bugtracker.

Offline

#9 2013-08-30 19:56:34

aintemail-al
Member
Registered: 2012-07-03
Posts: 6

Re: SSH: No interactive session

@cippaciong
Thanks. Unfortunately  does not work. I made the keys, the server logs me in, but no prompt in the client's side.
Here the output

ssh -v root@192.168.11.3
OpenSSH_6.2p2, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 192.168.11.3 [192.168.11.3] port 22.
debug1: Connection established.
debug1: identity file /home/nolby/.ssh/id_rsa type 1
debug1: identity file /home/nolby/.ssh/id_rsa-cert type -1
debug1: identity file /home/nolby/.ssh/id_dsa type -1
debug1: identity file /home/nolby/.ssh/id_dsa-cert type -1
debug1: identity file /home/nolby/.ssh/id_ecdsa type -1
debug1: identity file /home/nolby/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 78:74:ef:d4:5b:a9:d4:a4:f9:9b:fc:da:87:f5:97:e1
debug1: Host '192.168.11.3' is known and matches the ECDSA host key.
debug1: Found key in /home/nolby/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/nolby/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.11.3 ([192.168.11.3]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.

And that's all, everything black bellow.
My system has the filesystem on an USB stick. I'am going to try another stick, and if that doesn't work sadly will change to another distribution.

Offline

#10 2013-09-20 18:40:16

kross
Member
Registered: 2013-09-20
Posts: 1

Re: SSH: No interactive session

I'm having the same problem on Ubuntu server, still haven't found any solutions.

http://askubuntu.com/questions/344863/s … y-or-so-on

Ideas would be appreciated.

Offline

#11 2013-09-20 23:29:55

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: SSH: No interactive session

I do not have the problem but unlike all of those that have posted so far I add an entry to /etc/hosts pointing to the server I inted to use over SSH regularly.
I'll outline the way I do it incase you guys want to give it a try.
1. host servername (eg: host google.com)
2. copy the IP address to /etc/hosts
3. log in to server by name (ssh ralvez@google)

Hope this helps smile

R.

Offline

#12 2018-03-04 02:00:13

mps
Member
Registered: 2018-03-04
Posts: 3
Website

Re: SSH: No interactive session

Old thread, but I just found a solution to this in my scenario. In my case, the QoS set by openssh client was the problem. As you can see, it is set differently for interactive sessions by default: https://man.openbsd.org/ssh_config.5#IPQoS

Which is why I could run commands on the server without problems but interactive sessions would just stall. So in my case, I could just do

ssh -o IPQoS=throughput user@server

That said, it actually DOES make sense to set the option to its default "lowdelay" so it might be a good idea to inspect your network's QoS setup. In my case and without actually knowing, I assume that our new access point has QoS set for wifi traffic.

Offline

#13 2018-03-06 19:34:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: SSH: No interactive session


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB