0

I am using a CentOS 7.3.1611 box as an ssh proxy server. Connecting to the proxy server itself works fine and the connection stays open and alive for hours.

Proxying an ssh connection via this server results in the session hanging after about a minute.

CLIENT ---> SSH-PROXY works.

CLIENT ---> SSH-PROXY ---> FOO-SERVER keeps hanging after a few seconds.

I am using these settings in my clients .ssh/config:

Host *
    ServerAliveInterval 30

Host SSH-PROXY
    HostName EXTERNAL_IP
    Port 22
    User root

Host FOO-SERVER
  proxycommand ssh PROXYSERVER -W 10.1.2.3:22
  User root

on the client I can reach out to FOO-SERVER using:

ssh FOO-SERVER

I already tried setting:

TCPKeepAlive yes
ClientAliveInterval 60

in /etc/ssh/sshd_config without any sucess.

What could be the issue here? (The connection to the server itself is rock stable. The exact setup works flawlessly when using Ubuntu 16.04.1 as the proxy server os).

  • I already tried setting: ... on the proxy server? – Jakuje Feb 3 '17 at 11:41
  • Hangs after exactly the same number of seconds each time, or is random? – Aaron Feb 3 '17 at 13:59
  • @Aaron seems to be an exact number. – Flatron Feb 4 '17 at 11:18
  • @Jakuje I also tried setting it both on the proxy. – Flatron Feb 4 '17 at 11:18
  • When using ssh on the proxy itself, the connections also time out after a certain amount of time. There is no firewall in between as well as the network connection is persistent throughout the whole time. – Flatron Feb 4 '17 at 11:19

Your Answer

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

Browse other questions tagged or ask your own question.