Skip to content

SSH connection worked flawlessly before; now I'm getting kicked off the server

Hi folks! I know this question doesn't pertain directly to Arch but I've gotten great help here before and I thought it wouldn't hurt to ask.

I'm SSH'ing into a remote machine in my office (while I work from home) to run some machine learning models. I've been doing this for a few months and it has worked flawlessly. I SSH in, start a TMUX session, activate my conda environment, launch my code and finally detach from the TMUX session and go about my business.

Over the last day or so however, after about 30 minutes, I get kicked off the server with the message:

Connection to exampleserver.com closed by remote host.
Connection to exampleserver.com closed.

This seems to happen independently of TMUX. For example, if I'm using the remote machine through VS Code and also have a random ssh session open in the background, both will disconnect at the same time, as well as any tmux session on that remote machine. I should also add that my SSH config file has a ServerAliveInterval set to 60 and this has worked fine in the past.

This isn't ideal for me as I have no other way to run my experiments. Id really appreciate anyone's two cents! Thanks :)

1 points3 comments
Open on Reddit
About this post
Posted
Archived
Score
1 · 100% up
Kind
Text
ID
k5msul

Author

18
posts
39
comments
0
media
View profile

3 comments

Check ClientAliveInterval in /etc/ssh/sshd_config - if it's not set, the default is 0, which means your connection should not time out. Also, check ConnectTimeout setting in /etc/ssh/ssh_config.d/* or ~/.ssh/config.

If this is not the case, then you have a different problem.

1 points

Thanks for your response! Should I do this on the client or remote side?

1 points

I have the default on the client side set to zero for the ClientAliveInterval and theres no connect timeout set in my config.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.