# SSH over OpenVPN doesn't work right.

## pawzlion

I have an openvpn (version 2.1_rc15 at both ends) connection setup between two gentoo boxes using shared keys. it works fine for the most part. I use mysql, http, ftp, scp over the vpn with no problems. But when I ssh from the client to the server over the vpn, weird things happen. I can login, i can execute some commands. But if i try to run an ncurses application like top, or i try to cat a file, the connection will stall and I'll have to sever the ssh session.

While it seems like a terminal emulation problem it makes no sense why using the vpn would affect the ability for ssh to render things correctly. I am at a loss to explain why everything else works, including scp, but ssh just breaks over the vpn. Any thoughts ?

----------

## pawzlion

Out of curiosity, I installed Tunnelblick on OSX which includes OpenVPN 2.1.1 and I copied over my config directory and keys from the gentoo openvpn client. I connected to the vpn server and tested ssh and it worked fine ! So I can only conclude that it is the openvpn client that is buggy and not a configuration error of some type.

However, I tried the ebuild of 2.1.0 on the client with no difference, and then 2.1.1 and later 2.0.9 from source, with still the same result. Now I'm not so sure if it's a bug in the openvpn software. It couldn't be something wrong with my tun device ? I'm running out of ideas. Right now the problem seems to be the linux client, since it works fine on darwin with the same server. Any suggestions most welcome

----------

## pawzlion

Ok, another update. No matter what I try on my gentoo client, recompiling etc, the result is the same. cat'ing a file in ssh always breaks it. FWIW, I know it's not openssh's fault, because I can use other ssh clients on my lan via the VPN and they all exhibit the same problem.

Now, I compiled openvpn (same version, 2.1rc15) on my much older (kernel 2.6.26) gentoo box and copied over the configs, and it works fine without exhibiting this problem at all. 

So what does this mean ? Is it a problem with the newer kernel (2.6.32) on my new gentoo box ? Is it my tun device ? Why does it work on my old gentoo box, but not my new one ?

----------

## tavisrudd

Did you ever figure this out?  Ssh over openvpn on 2.6.34 is working for me, but the initial login is very slow, despite fast pings and having use_dns disabled in sshd_config.

----------

