Score:0

SSH over WiFi suddenly stops on laptop

dj flag

I have a laptop running Ubuntu server with Plex (Server runs on WiFi (2.4 GHz)). When sshing into the server it usually works but randomly (like after 40min) it says host down despite laptop still running and I have to reboot the server to use ssh again.

*Edit- I have noticed a pattern this usually happens when I disconnect from ssh by typing exit and after 10min minutes or more it says host down... etc the only solution I can do is to run htop or any other command to stop it from disconnecting.

onlysaikihere@hub: $ client_loop: ssh_packet_write_poll: Connection to 192.168.0.145 port 22: Host is down
sahishnukumar@Sahishnu-kumar ~ % ssh onlysaikihere0192.168.0.145
ssh: connect to host 192.168.0.145 port 22: Host is down
sahishnukumar@Sahishnu-kumar ~ % ssh onlysaikihere@192.168.0.145
ssh: connect to host 192.168.0.145 port 22: Host is down
sahishnukumar@Sahishnu-kumar ~ % ssh onlysaikihere0192.168.0.145
ATTA
AC
sahishnukumar@Sahishnu-kumar
~ % ssh onlysaikihere@192.168.0.145

using mosh gives following output

sahishnukumar@Sahishnu-kumar ~ % mosh onlysaikihere@192.168.0.145
/opt/homebrew/bin/mosh: Could not connect to 192.168.0.145, last tried 192.168.0.145: Host is down
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
/opt/homebrew/bin/mosh: Did not find remote IP address (is SSH ProxyCommand disabled?).
sahishnukumar@Sahishnu-kumar ~ % 

plex server also stop working

FORMATTED LAPTOP AND ISSUE FIXED

waltinator avatar
it flag
Check the logs on the server. The problem is probably on the server. On the laptop, `sudo journalctl -b 0 -u NetworkManager` may supply more information.
waltinator avatar
it flag
Please copy/paste and format text instead of pictures of text. A picture (of text) can't be read on a text-only terminal, can't be copied from (edited, tried, and made to work), AND makes one take an action to even read your Question. Since we're all volunteers, some won't.
Retro Xcalibur avatar
dj flag
@waltinator updated it by adding text ,log is too long https://pastebin.com/Jd2ZUNnC
vn flag
You can get more info with `ssh -v ...`. Also, for unstable connections you could use [mosh](https://mosh.org/) on top of ssh.
Score:0
cn flag

Try setting SSH up for regular pings:

Host *
    ServerAliveInterval 60

Add this to the top of your ~/.ssh/config and sessions should no longer drop. The default, larger interval does not prevent that from happening.

Retro Xcalibur avatar
dj flag
the file was empty for me , I added this to the top "Host * ServerAliveInterval 60"
mchid avatar
bo flag
@RetroXcalibur Did it work?
Retro Xcalibur avatar
dj flag
@mchid sorry I wasn't able to reply, I went to sleep , I left ssh on with yt-dlp downloading playlist and when I woke up ssh was up and connected so I guess this fixed it as I was connected to server for 8 hours
Retro Xcalibur avatar
dj flag
the problem started again.
cn flag
Maybe your Wi-Fi was inactive long enough to skip some keep-alives, such as by being in sleep mode.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.