49

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

Jeff Saremi
  • 2,674
  • 3
  • 33
  • 57
  • 2
    I think there is a bug in moba when displaying large amount of text and scrolling up/down then it appears. Sometimes. It's a pitty, beside this, moba is probably the best ssh terminal. – Michal Dobrodenka Mar 24 '21 at 19:07
  • Any update? Settings -> Configuration -> SSH -> SSH keepalive ... get me just 60 seconds :( – JRichardsz May 31 '21 at 16:55

3 Answers3

117

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

Gulzar
  • 23,452
  • 27
  • 113
  • 201
helloworld
  • 1,304
  • 1
  • 10
  • 11
  • 15
    remember to restart mobaxterm app after changing the setting. Then only it worked for me. – Nisuga Jayawardana Feb 27 '20 at 05:21
  • 3
    The problem is it sets keepalive to 60 seconds by default and this doesn't work for me. It would be nice to have this configurable. – pseudozach Nov 16 '20 at 18:48
  • 1
    Do keepalives actually work on Windows? I read that Windows does not consider TCP packets with NULL payload as valid network traffic, and it can't thus handle keepalives. It does not work with PuTTY, though I still have to thoroughly test it (after I figure out why W10 losses DNS name resolution...) :P Ah, the many joys of Windows :) – runlevel0 Aug 18 '21 at 09:29
  • How can i reduce keepalive timeout to 20 seconds? – SuB Dec 27 '22 at 07:27
6

In my case I have SSH keepalive option checked but this happens every now and then.

So what I do is.

  • Disable (uncheck) SSH keeaplive close MobaXterm
  • Open MobaXterm and check SSH keeaplive close MobaXterm (again)
  • Open MobaXterm enjoy the stability for a couple of weeks...

I am using a licensed version on a computer running Windows 10 Professinal version 20H2.

jepachecoh
  • 106
  • 1
  • 1
  • 2
    Just tried this on Windows 10 Enterprise and unfortunately it did not work. I started getting closed connections after an update to our authentication system, so I suspect in my case, and likely others, this is a server issue. – Todd Gillette Oct 30 '20 at 14:36
6

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. :-)

pastorchris
  • 63
  • 1
  • 3