Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mosh-server exits after closing initial SSH session #1294

Open
geoff-sheldon opened this issue Sep 9, 2023 · 2 comments
Open

Mosh-server exits after closing initial SSH session #1294

geoff-sheldon opened this issue Sep 9, 2023 · 2 comments

Comments

@geoff-sheldon
Copy link

On a Manjaro server and Debian Client config, the mosh client is able to SSH in, start mosh-server, then grab the connection details and exit, but when it attempts to connect via UDP nothing is received from the server.

I was able to connect by manually running mosh-server on the server, then copying the key and running mosh-client on my Debian client. However, if the session that spawned the mosh server is closed, the mosh server dies immediately. Here's how I tested the issue and arrived at this conclusion:

  • SSH from Debian client to Manjaro server (success)
  • start a tmux session within SSH session (success)
  • start mosh server in tmux session (success)
  • detach tmux session but leave SSH connection open (success)
  • start a new mosh-client connection using the details from above (success)
  • attach the tmux session to the new Mosh session (success, I can even see the mosh connection details in the tmux pane)
  • close the original SSH session that is not currently showing tmux output (FAIL)

I believe the same is happening when I run mosh by itself, even though the mosh server reports that it is detached from the terminal session it definitely is not.

@Crest
Copy link

Crest commented Sep 12, 2023

Does it make a difference if you logged into the system with an other SSH session? Do processes started with nohup/tmux/screen keep running if you logout? Has systemd been (mis-)configured to kill all processes on closing all login sessions? Are any errors written to stdout/stderr or syslog?

@raduc
Copy link

raduc commented Sep 21, 2023

I had a similar issue with Siduction and the above comment helped me find that there was a line
KillUserProcesses=yes in /etc/systemd/logind.conf. Commenting it out made mosh work again.

See also a similar issue: #1171

Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants