Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4.26k stars 570 forks source link

SSH Disconneting after 30-50 seconds #5893

Closed tschettervictor closed 8 months ago

tschettervictor commented 8 months ago

Describe the bug SSH connection terminates at 30-50 seconds.

To Reproduce Open an SSH session using a local device group, and do stuff for 30-50 seconds.

Expected behavior It should stay connected.

Server Software (please complete the following information):

Client Device (please complete the following information):

Remote Device (please complete the following information):

Your config.json file

{
  "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
  "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
  "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
  "settings": {
    "cert": "mesh.mydomain.ca",
    "_WANonly": true,
    "_LANonly": true,
    "sessionKey": "random string",
    "sessionTime": 168,
    "port": 8443,
    "debug": true,
    "aliasPort": 443,
    "_redirPort": 80,
    "_redirAliasPort": 80,
    "TlsOffload": "192.168.50.135",
    "_trustedProxy": "192.168.50.135",
    "MariaDB": {
      "host": "localhost",
      "user": "meshcentral",
      "password": "password",
      "database": "meshcentral"
    }
  },
  "domains": {
    "": {
      "title": "Mesh",
      "title2": "Mesh",
      "certUrl": "https://192.168.50.135",
      "ssh": true,
      "mstsc": true,
      "allowSavingDeviceCredentials": true,
      "_minify": true,
      "_newAccounts": true,
      "userNameIsEmail": true,
      "agentInviteCodes": true
    }
  },
}
tschettervictor commented 8 months ago

Perhaps I posted too soon. It appears to be only with one of my servers (TrueNAS CORE) The rest seem to stay connected until I decide to disconnect

tschettervictor commented 8 months ago

I’m going to reopen as this is my most important server I’m connecting to. I have an identical one that doesn’t disconnect so I’m curious if you have any ideas @si458

si458 commented 8 months ago

i would say this has to be an issue with your remote server, because if all of your machines work EXCEPT 1, then the must be an issue with that single server is the any errors inside the logs? (check my server tab then error logs)

tschettervictor commented 8 months ago

It’s incredibly weird but if I connect via hostname, all good. But if I try by IP, it disconnects after 40 seconds.

tschettervictor commented 5 months ago

Updating to 1.1.23 seems to have resolved this issue for now.