Categories
Linux Mastering Development

ssh session freezing when connecting via router

My ssh sessions to my virtual machines keep freezing/dropping/locking up.

I never had any problems with any of my other machines, which I ssh to/from regularly. I am only having probems when sshing to this VM, and only when I ssh via a router.

This is to say that –

  • If I connect from the host to the VM, there is no problem.
  • If I connect from my desktop machine to the host, there is no problem.
  • Only when I connect from my desktop machine to the VM does this issue occur.
  • I have tried pinging the VM from my desktop and it does not appear to be dropping packets. (I sent over 500 and there were no dropped packets.)

The topology is:

  • Desktop machine 192.168.3.100
  • VM host 192.168.3.101
  • Router 192.168.3.1
  • VM 192.168.100.184

The router has a static route set to network 192.168.100.0/24 via 192.168.3.101. The router is pfSense based.

I have set

  • ClientAliveInterval 1 on the server side
  • ClientAliveCountMax 10000 on the server side
  • ServerAliveInterval 1 on the client side

This is the output from ssh -vvv (well, the tail end of it)

debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: receive packet: type 82
debug3: send packet: type 80
debug3: receive packet: type 82
debug3: send packet: type 80
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: receive packet: type 82
debug3: send packet: type 80
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype keepalive@openssh.com reply 1
debug3: send packet: type 100
debug3: send packet: type 80
debug3: send packet: type 80
debug3: send packet: type 80
Timeout, server 192.168.100.184 not responding.

Here is an example of ping output

From 192.168.3.1: icmp_seq=517 Redirect Host(New nexthop: 192.168.3.101)
64 bytes from 192.168.100.184: icmp_seq=517 ttl=63 time=0.985 ms

Why is this happening, or what can I do to further investigate the problem?

Leave a Reply

Your email address will not be published. Required fields are marked *