ssh hangs after Entering interactive session


dovotefavorite



I used to connect to a remote

Linux
server through
ssh -v remote
from my
osx
client. Now the connection hangs after authentication:
debug1:Entering interactive session.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0

This is happening with both remote servers I have available. I can instead successfully do remote port forwarding (with a not-interacting session)

ssh -fN remote

I have checked that the ssh to my remote servers is connecting correctly via ssh on my

Linux
box that I run on
osx
within a virtual box.

I am using the following configuration for ~/.ssh/config

ServerAliveInterval120
Host   *
ForwardX11  yes  
Host  remote 
HostName  remote.address.uk 
HostKeyAlias  remote.address.uk 
User  myusername 
LocalForward  localhost:5903 remote:5904
LocalForward  localhost:5902 remote:5901
TCPKeepAlive  yes 
IdentityFile   ~/.ssh/id_rsa
Now I am doing all the ssh through the virtual box, that is ridiculous. How can I restore the functionality of ssh? I am running mavericks 10.9.5 on macbook air 2013

MacBook Air, OS X Mavericks (10.9.5)

Posted on Nov 16, 2016 6:05 PM

Reply
5 replies

Nov 17, 2016 5:38 AM in response to afylot

If you do ssh -v -v -v from the Mac, and then do ssh -v -v -v from VirtualBox, is there a point in the debug output where the Mac takes a hard left turn that is radically different from the VirtualBox connection?


On the destination Linux system look for sshd log entries in /var/log/* files, and see if there is anything interesting there.


You can modify the Linux /etc/ssh/sshd_config file and change the

#LogLevel INFO

to

LogLevel DEBUG3


Then send

sudo kill -HUP <sshd's pid>

so it will re-read the sshd_config file. Or reboot the Linux system.

NOTE: change the LogLevel back after you have finished diagnosing the ssh connection.


You should test by renaming your ssh ~/.ssh/config file just to make sure it is not something in the config file interfering from the Mac.

Nov 17, 2016 6:06 AM in response to afylot

Are you trying to send Linux X11 displays back to the Mac?


I use:

ssh -4 -C -Y remote.linux.address

and my exported Linux displays come back to XQuartz just fine. The -Y is ForwardX11Trusted in a config file. I've used -X (ForwardX11) in the past, but I have less problems using -Y. The -4 to force IPv4 may or may not be affecting your connections, as the Mac may try using IPv6, and that is still not as robust on all platforms and routers.


Up until last Christmas, I used Mavericks with XQuartz over ssh -Y connections. The past year I've been using El Capitan and XQuartz to do the same thing.


The only ssh problem I had with El Capitan was its ssh defaulting to using more secure encryption, but the AIX systems I also work with still using only the older ssh encryption. I had to add older ciphers to the /etc/ssh/sshd_config file on my iMac so that AIX could ssh into my iMac (I frequently use scp and rsync over ssh to transfer files)

# in /etc/ssh/sshd_config I had to add this very long single line

# so older AIX systems could ssh to my iMac:

Ciphers 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,arcfour128,arcfour256,

aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,

aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,

aes256-gcm@openssh.com,chacha20-poly1305@openssh.com

as one very long line.


Otherwise ssh has been a very dependable tools that I depend on all day long at work.

Nov 17, 2016 1:41 PM in response to afylot

From:

https://www.xquartz.org/releases/archive.html

I do NOT know if newer versions for Yosemite, El Capitan or Sierra will work for Mavericks.


I am running 2.7.11 (current release) on El Capitan and it is working fine. It has been a year since I ran Mavericks, and I do not know what version of XQuartz I was running at the time.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ssh hangs after Entering interactive session

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.