Closed manprint closed 5 months ago
Hello @manprint ,
The connection being closed by remote host makes me think that the connection is either unbound (no tunnel) or unauthed (just staying at password auth). The ServerAliveInterval should be at least the ping-client-interval
(usually a bit more for buffer).
Could you share the full sish command you are using as well as the full autossh command? It could have something to do with the tunnels being used.
Also, any logs from sish (and exit codes, just in case sish is the thing that is crashing) would be helpful as well!
Hi, Thanks for your quick response.
This is my typical command when running sish with autossh:
autossh -M 0 -p 2222 -R subdomain:80:localhost:5000 sish.mydomain.it
I checked the sish logs and there are no crashes.
Hrm yeah, there's nothing complicated going on there then. I would try the ping-interval and timeout modifications.
The other thing it could be is something with the autossh monitoring forward acting weird? Though not sure why that would be.
Ok, let's try changing the timeout and ping-interval settings. Do you have any values to suggest?
Hi @antoniomika
I'm testing with the following parameters:
--ping-client=true \
--ping-client-interval=30s \
--ping-client-timeout=30s \
The autossh command I'm using is the following:
autossh -M 0 -o "ServerAliveInterval 35" -o "ServerAliveCountMax 2" -p 2222 -R mysubdomain:80:localhost:5000 sish.mydomain.it
What do you think about it? Suggestions?
Those look good to me! Let me know how it goes!
Ok, thanks. I'll leave it like this and check. I'll let you know soon.
Fabio
Hi @antoniomika
I tested with the settings I wrote above. The connection is much more stable. In three days there was only one disconnection.
Thanks as always for the support.
Fabio
Awesome! I'm gonna close this for now! Again, if you're happy with sish and the work I'm doing, please consider sponsoring the project!
Best,
Antonio
Hi @antoniomika
I noticed, looking at the logs of the ssh client connected to the sish server, that there are frequent disconnections and restarts (the client is managed with autossh or systemd service).
The sish server is deployed on an AWS machine and my clients are also almost all on AWS so I don't think that the disconnections are caused by connection problems (in general the EC2 AWS have stable connections)
When the client logs out they show the message:
What can I do to avoid these frequent disconnections? Should I use, client-side, ssh with any of the following parameters? (If so, what values do you recommend?)
The parameters I use on the server side are these:
Do you have any recommendations or tips for keeping the connection alive and avoiding frequent client restarts? Are the values set on the sish server adequate to keep the connection stable and avoid restarts?
Thank You. Fabio