You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interesting. Can you run ssh SERVER 'echo $SSH_CONNECTION' and paste the result? I'm curious whether systemd is also causing sshd to become confused as to the client's IP address.
Sorry for bringing an old issue up. I've been looking into this for CoreOS, the issue is that systemd will default to killing everything when the sshd socket is closed. Which means mosh-server will output the connect line, but be killed before mosh-client can connect to it.
The solution is to change KillMode to process so only the sshd process is closed when the socket is closed.
For others running into this issue, a way I found for working around this problem without changing the sshd configuration is by using --server="systemd-run --scope --user mosh-server".
My systemd kills screen and mosh sessions associated to ssh, but only on one Ubuntu machine where KDE Neon is installed. In my case, mosh only worked with this option: --server="sudo systemd-run --scope sudo -u USERNAME mosh-server" where USERNAME is my login username and it can execute commands with sudo without password.
Activity
keithw commentedon Mar 10, 2013
Interesting. Can you run
ssh SERVER 'echo $SSH_CONNECTION'and paste the result? I'm curious whether systemd is also causing sshd to become confused as to the client's IP address.keithw commentedon Apr 30, 2013
Most likely fixed in 4792992 with the
--bind-server=anyoption.bharrisau commentedon Jul 12, 2015
Sorry for bringing an old issue up. I've been looking into this for CoreOS, the issue is that systemd will default to killing everything when the sshd socket is closed. Which means mosh-server will output the connect line, but be killed before mosh-client can connect to it.
The solution is to change KillMode to process so only the sshd process is closed when the socket is closed.
Edit: This is not a bug in mosh.
cgull commentedon Dec 18, 2015
pam_systemdis apparently also relevant: http://comments.gmane.org/gmane.comp.sysutils.systemd.devel/19311(Still not a bug in mosh.)
jamespinkerton commentedon Jul 12, 2017
Hi. I'm getting the same problem. I tried to add the --bind-server=any and it didn't work.
I ran the following command:
mosh --bind-server=any --ssh="/usr/bin/ssh -i ~/.ssh/google_compute_engine.pub" james_c_pinkerton@$IP_ADDRESSreuben commentedon Apr 2, 2018
For others running into this issue, a way I found for working around this problem without changing the sshd configuration is by using
--server="systemd-run --scope --user mosh-server".kecsap commentedon Sep 11, 2018
My systemd kills screen and mosh sessions associated to ssh, but only on one Ubuntu machine where KDE Neon is installed. In my case, mosh only worked with this option: --server="sudo systemd-run --scope sudo -u USERNAME mosh-server" where USERNAME is my login username and it can execute commands with sudo without password.
Add support for command prefix before etterminal/etserver commands on…