Reputation: 3024
How do i stop this?
Session stopped
- Press <return> to exit tab
- Press R to restart session
- Press S to save terminal output to file
Network error: Software caused connection abort
It looks SSH keepalive
setting has no effect there
Upvotes: 62
Views: 137926
Reputation: 1
Upvotes: 0
Reputation: 109
As an altenrative, if you need some code to keep running even if you get disconnected (for example, large SQL querys) you can use tmux to create a session that executes in the background. If you get disconected you can simply attatch back to the session where you were executing the code.
In case someone need it you can find a tmux cheatsheet here
Upvotes: 0
Reputation: 1
Change the Settings -> Configuration -> SSH -> SSH Engine to Legacy it will work enter image description here
Upvotes: 0
Reputation: 1564
If you are still looking for the answer like me, here you go!
Settings -> Configuration -> SSH -> SSH keepalive
Restart MobaXTerm after changing the setting for it to take effect.
https://superuser.com/a/1298536
Upvotes: 143
Reputation: 73
Both solutions posted above (by @helloworld & @jepachecoh) actually work but there may be need for extra work, so here are a few additions.
The two options above work if:
1. You're connecting to a host (destination server) that is running SSH (daemon) but doesn't have any session timeout configurations set for connecting SSH clients.
2. You're connecting to a host that already has SSH client timeout configuration set but the set value (on the remote host) is either higher than, or equal to the "keepalive" value you have set on your SSH client (like MobaXterm, Putty etc).
If the destination server's "SSH keepalive configurations for the clients" are set, they override your remote client SSH keepalive configurations, hence controlling the session timeouts.
To find out if there are any configs set on the destination server's SSH configurations, use the command below (as root, or a user with sudo privileges):
$ cat /etc/ssh/sshd_config | grep "ClientAlive"
The command above works on multiple Linux and Solaris flavours. If you don't have admin access to the destination server, your Systems administrator may be managing your session timeouts irrespective of the "keepalive" parameters you set on your SSH client before connecting.
Lastly, if you are using VPN software, or connecting to a demilitarized zone (DMZ), sometimes the session timeouts are controlled at that level (firewall level), so involve your Network administrator.
Bottom line, love your administrators. :-)
Upvotes: 7
Reputation: 136
In my case I have SSH keepalive option checked but this happens every now and then.
So what I do is.
I am using a licensed version on a computer running Windows 10 Professinal version 20H2.
Upvotes: 8