MacOS – ssh hangs after authentication

macosremote desktopsshterminal

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 removed the .bash* and .cshrc and .profile files on the remote servers.

I have checked that the ssh to my remote servers is working correctly on my Linux box that I run on osx within a virtual box.

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

ServerAliveInterval 120

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

Best Answer

The problem was that the x forwarding is broken on my osx. I have disabled it and now I can connect again