You are not logged in.
Pages: 1
Topic closed
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
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
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
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
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
Are you using ssh keys or plain login to connect to your server?
Offline
Are you using ssh keys or plain login to connect to your server?
Plain login, I tip the password (see the output posted).
Offline
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
@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
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
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
R.
Offline
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
Offline
Pages: 1
Topic closed