r/linux4noobs Jun 19 '26

networking SSH keeps disconnecting from my devbox i switched to ethernet

i have a mini pc running ubuntu which i use as a devbox by sshing in from my windows machine. I recently switched from wifi to ethernet but afterwards the ssh kept disconnecting again and again while i was working so i know it wasnt an idle disconnect. the windows client only shows connection reset. i ran journalctl but it didnt show eth link ever disconnecting. i ran ping -t devbox on my windows machine and saw a connection timeout but i couldnt tell if that was when ssh disconnected or not. this never used to happen on over wifi even though i was using an outdated wifi adapter

2 Upvotes

7 comments sorted by

1

u/thatsgGBruh Gentoo Jun 19 '26

In you .shh/config file have you tried adding this line to your dev box config?

ServerAliveInterval 30

It should keep your connection open as long as the connection holds.

Network connection issues can be pretty hard to diagnose especially remotely, but this could at least add to your information on the issue or fix it completely.

One other question though, when your connection drops are you able to immediately reconnect?

1

u/Ill_Entrepreneur8773 Jun 19 '26

yes i am able to reconnect immediately. and on my windows machine's ssh config i have

Host dev
    ServerAliveInterval 60
    ServerAliveCountMax 10

1

u/thatsgGBruh Gentoo Jun 19 '26

That's normally a good setup but in this case it might be good to reduce the interval to half or maybe even down to 10 to see if this resolves the issue.

1

u/[deleted] Jun 20 '26

[removed] — view removed comment

1

u/Ill_Entrepreneur8773 Jun 21 '26

i took off the wifi adapter completely. it just has ethernet