0

I'm running Ubuntu 18.04, and I am attempting to SSH in to an IP address on a server that I have connected to using OpenVPN. Note that I have been able to ssh in to the IP address via PUTTY on my Windows laptop, but this is not the case on my Ubuntu machine. On my Ubuntu laptop, once I've connected to the VPN I am able to ping the IP address without a problem, but when I try to run ssh -v username@ipaddress I get the output:

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 10.1.50.11 [10.1.50.11] port 22.
debug1: Connection established.
debug1: identity file /home/ellie/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/ellie/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ellie/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ellie/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ellie/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ellie/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ellie/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ellie/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4
debug1: match: OpenSSH_8.2p1 Ubuntu-4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 10.1.50.11:22 as 'ewhite'
debug1: SSH2_MSG_KEXINIT sent

It hangs at the final step. I tried following the steps here Setting correct MTU for OpenVPN and found that the MTU was 297. I set mssfix at 250 and tried to re-connect to the OpenVPN server then connect to the ssh again, but the outcome was the same -- it got hung up at the 'SSH2_MSG_KEXINIT sent' step. Do you have any advice on what could be going on here / how I could fix it? I've searched around on Stack Overflow and elsewhere the best I can but so far none of the solutions that I have come across seem to work. If I can clarify any of the above / provide more information I'd be glad to. Thanks in advance for your time and help!

  • I just tried this (successfully) on my system using openvpn and my output looks essentially identical to yours up to where it stops except that the version number on the server is higher than mine for OpenSSH. The next line I got was SSH2_MSG_KEXINIT received – Organic Marble Jul 6 at 16:36
  • Thanks for the feedback. One thing maybe I should clarify (though possibly it doesn't make any difference) is that the server is not hosted by me, but by another group. Also, I have been able to SSH in to other servers, just not this one. Do you have any suggestions as to something I could try? Thanks again! – ewhite42 Jul 7 at 13:02
  • I googled and got several hits on ssh stalls at SSH2_MSG_KEXINIT received on various stack exchange sites. Maybe take a look at the answers to some of those questions. – Organic Marble Jul 7 at 13:04
0

Ok, so in the end I was able to solve this problem thanks to a piece of advice from someone I'm working with. Apparently I just needed to change the line:

comp-lzo no

in my ovpn file to:

comp-lzo yes

And that solved the problem! This solution did not come up anywhere I searched online so I wanted to be sure to share it here in case it would be useful for others. Cheers!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.