tg123/sshpiper

SSH Session closed after 48 seconds idle

Closed this issue · 5 comments

Any idea how to troubleshoot this?

time="2024-05-16T13:04:34Z" level=info msg="ssh connection pipe created XXX.XXX.XXX.XXX:12295 (username [user-src]) -> ZZZ.ZZZ.ZZZ.ZZZ:22 (username [user-dest])"
time="2024-05-16T13:04:36Z" level=debug msg="connection accepted: YYY.YYY.YYY.YYY:35197"
time="2024-05-16T13:05:24Z" level=info msg="connection from XXX.XXX.XXX.XXX:12295 closed reason: EOF"
time="2024-05-16T13:05:26Z" level=debug msg="connection from YYY.YYY.YYY.YYY:35197 establishing failed reason: EOF"

The upstream side sshd only logs:

sshd[706]: pam_unix(sshd:session): session closed for user user-dest
sshd[678]: syslogin_perform_logout: logout() returned an error

can you ssh -vv to user-dest @ zzz directly without piper?
likely zzz closed connection and did not give any reason

Without using the sshpiper (directly ssh from pod to pod) the ssh session is not closed. Even after minutes of idle. Do you need any logs?

any luck to capture package?
wish to know which side initiated the close

could you please also add keepalive at client side? (downstream, ssh client)

Was not a problem of sshpiper :) 50.000ms where the default timeouts on the loadbalancer...

In our case (OpenStack) we increased it to 24 hours via annotations in the k8s loadbalancer type service:

apiVersion: v1
kind: Service
metadata:
  annotations:
    loadbalancer.openstack.org/timeout-client-data: "86400000"
    loadbalancer.openstack.org/timeout-member-data: "86400000"
[...]

Thank you for your help!