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
I believe this is because of the fact that mosh-server takes over from sshd and sshd quits, therefore the tunnel disappears just after it is made. It would be nice if mosh could keep sshd alive if -L or -R are present in the --ssh argument
Reacted by James Gifford, haarp, Daniel Woelfel, Berkay Antmen, Archer, shrx, Huanᶜ, Dmitry Mostovenko, Louis M., Ben Usman and 100 more
Reacted by Michael Henke, Sepero, Navin Francis Shajan, Zhymabek Roman, redhat421 and seanmamasde
Reacted by Matt, Henri Menke, Ryan Thomas Lynch, Sepero, Zhymabek Roman, /\ngel and Tomáš Horáček
Reacted by Matt, jack, Grzegorz Kossakowski, Henri Menke, Ryan Thomas Lynch, Sepero and Tomáš Horáček
I think this would be good if you connect and disconnect per session. If you use mosh to connect only once, one foreseeable problem is when the remote device changes IP address while roamin. mosh is able to auto-negotiate the new IP address ... one of mosh's goals (How Mosh works) ... but the tunnel would be good as dead in this case.
I don't want to add a feature to mosh that unexpectedly stops working once the client roams for the first time. If we add port forwarding, it will need to roam (like the rest of mosh). We wouldn't just leave the SSH connection up to break later.
Reacted by Utkarsh Upadhyay, Scott Weldon, Archer, Michael Hendricks, Michael Luggen, Thomas, tuxayo, Feraidoon Mehri, Ludwig Schubert, Lukas Winkler and 18 more
Good points, and mosh obviously can't auto-reconnect the SSH tunnel because
of authentication issues, right?
On Oct 21, 2012 11:16 PM, "Rommel Custodio" [email protected]
wrote:
I think this would be good if you connect and disconnect per session. If
you use mosh to connect only once, one foreseeable problem is when the
remote device changes IP address while roamin. mosh is able to
auto-negotiate the new IP address ... one of mosh's goals (How Mosh works)
... but the tunnel would be good as dead in this case.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/337#issuecomment-9653535.
Reacted by Omry Yadan, Reed Riley, James Turnbull, Utkarsh Upadhyay, Pasha Finkelshteyn, Louis M., AJ Caldwell, Salomon Popp, robert7k, Pranay Prakash and 6 more
Could anybody familiar with the Mosh codebase comment on the expected difficulty of this addition? Perhaps point out the relevant files? That might make it easier for somebody to take a crack at it.
Reacted by James Nylen, Archer, Louis M., Name, Adam, Feraidoon Mehri, Martin Czygan, Sepero and /\ngel
@MisterTea sure, but my HPC cluster has only mosh server(s) installed so far... I reckon that with ET they would have to install yet another service? If ET works well against Mosh server, that would solve the issue for me, if not, this bounty is still relevant to me ;)
@brainstorm Yep, ET is it's own server that you have to install. Where I work we have 100s of engineers using ET, but it's up to your use case to decide whether it works well for you.
I just took a look at some of the Mosh source code to see how hard this would be to implement reconnecting streams. From my naive perspective, it seems like the Mosh protocol doesn't map very cleanly to adding extra network streams since the protocol is designed to only have one stream each way.
To add TCP like support you'd have to create a new state syncronizer that acts like a TCP connection (probably based off of Network::UserStream() since that's a reliable connection).
But you're still stuck with the issue that mosh only allows one stream each way. Looks like there's three main ways to do this:
Create multiple Network::Transport connections, one for each TCP/UDP stream. This would require some major refactors to how mosh connections get established since they assume one ip/port per session.
Modify Network::Transport to support multiple senders and receivers. This seems like a huge pain since it's using C++ templates and having an arbitrary number of streams seems painful.
Create a multiplexer stream that can multiplex multiple streams over the existing connection. This seems like the easiest since it doesn't involve modifying much of the existing code base.
All of these options would likely break backwards compatibility.
Reacted by Claudia Pellegrino, Roman Valls Guimera, robert7k, Nelson Chen, Feraidoon Mehri, VitoVan, Matt, Javier, Eddie Carswell, ivz hh and 1 more
I don't want to use Bounty Source, but I want to contribute another $300 raising the bounty
Total to $955
I can make payment through PayPal or Monero or other. If you are a mosh developer and accept then please let me know, as I will send you half ($150) immediately to begin development, and the other half after changes are merged into master or a testing branch
I've used Bounty Source before and had problems with them, so I'd rather not have that again. Thank you @tsunamaru for helping push the bounty over $1000
Welp, I just read about Bountysource problems (thanks @huyz for pointing that out) and decided to ask PayPal for refund. I'm not sure if or when it'll be processed but regardless I will be happy pay my part to anybody after their changes is merged, would it be PayPal, crypto or any other suitable method.
Folks, I don't want anybody to waste their money here -- I don't think the issue is about money; it's about changes people are asking for in the Mosh/SSP protocol. These protocol changes would have to be designed, and then implemented at both ends of the connection, and then supported. Think about other protocols or interchange formats you might want to change -- can you post a $1,000 bounty and get them to add a new field to TCP or a new tag to HTML? :-)
Adding support for reliable byte streams would be a big change to the Mosh protocol, and I don't sense anybody is eager to design, implement, and support this kind of major change. I think EternalTerminal can probably already do this; you might consider using that if you need reliable byte streams.
Reacted by Robert K. Bell, Janne Kujanpää, matthewdippel, Davids Paskevics, Palash Das, James and mbartlett21
Activity
sessyargc commentedon Oct 22, 2012
I think this would be good if you connect and disconnect per session. If you use mosh to connect only once, one foreseeable problem is when the remote device changes IP address while roamin. mosh is able to auto-negotiate the new IP address ... one of mosh's goals (How Mosh works) ... but the tunnel would be good as dead in this case.
keithw commentedon Oct 22, 2012
I don't want to add a feature to mosh that unexpectedly stops working once the client roams for the first time. If we add port forwarding, it will need to roam (like the rest of mosh). We wouldn't just leave the SSH connection up to break later.
staticfloat commentedon Oct 22, 2012
Good points, and mosh obviously can't auto-reconnect the SSH tunnel because
of authentication issues, right?
On Oct 21, 2012 11:16 PM, "Rommel Custodio" [email protected]
wrote:
omry commentedon Apr 3, 2015
why wouldn't mosh be able to reconnect the tunnel as well?
brainstorm commentedon Sep 17, 2015
Yeah, I would like to drop those lines in my
~/.ssh/config:And be able to have that local tunneling done with mosh too. Is it that different from a plain SSH connection that drops and recovers?
brainstorm commentedon Oct 7, 2015
I opened a $50 bounty for this issue:
https://www.bountysource.com/issues/4471419-ssh-port-forwarding-doesn-t-work
Should anyone solve this one or related ones like issue #120
dwwoelfel commentedon Jun 30, 2016
The bounty for this feature is up to $200, now.
mharradon commentedon Nov 11, 2016
I threw in a bit, up to $235.
Could anybody familiar with the Mosh codebase comment on the expected difficulty of this addition? Perhaps point out the relevant files? That might make it easier for somebody to take a crack at it.
wittrup commentedon Dec 18, 2016
I currently use some ugly "auto"ssh script that run ssh like this:
Having mosh do that for my network of raspberry pi would be awesome. Bounty increased.
claui commentedon Jul 26, 2017
The bounty has now reached $300.
MisterTea commentedon Sep 20, 2017
FYI: port forwarding works in Eternal Terminal with the -t option. https://mistertea.github.io/EternalTCP/
brainstorm commentedon Sep 21, 2017
@MisterTea sure, but my HPC cluster has only mosh server(s) installed so far... I reckon that with ET they would have to install yet another service? If ET works well against Mosh server, that would solve the issue for me, if not, this bounty is still relevant to me ;)
MisterTea commentedon Sep 21, 2017
@brainstorm Yep, ET is it's own server that you have to install. Where I work we have 100s of engineers using ET, but it's up to your use case to decide whether it works well for you.
bkarlson commentedon Oct 3, 2017
Does not look like ET supports remote (-R) tunneling either
MisterTea/EternalTerminal#59
d4l3k commentedon Jul 10, 2018
I just took a look at some of the Mosh source code to see how hard this would be to implement reconnecting streams. From my naive perspective, it seems like the Mosh protocol doesn't map very cleanly to adding extra network streams since the protocol is designed to only have one stream each way.
To add TCP like support you'd have to create a new state syncronizer that acts like a TCP connection (probably based off of
Network::UserStream()since that's a reliable connection).But you're still stuck with the issue that mosh only allows one stream each way. Looks like there's three main ways to do this:
Network::Transportconnections, one for each TCP/UDP stream. This would require some major refactors to how mosh connections get established since they assume one ip/port per session.Network::Transportto support multiple senders and receivers. This seems like a huge pain since it's using C++ templates and having an arbitrary number of streams seems painful.All of these options would likely break backwards compatibility.
19 remaining items
achernya commentedon Apr 28, 2023
I'm sorry, what is the bounty comment supposed to mean?
aatkinson commentedon Apr 28, 2023
I believe @catskul is referring to the bounty set on this very bug. See here for details: https://app.bountysource.com/issues/4471419-ssh-port-forwarding-doesn-t-work
Sepero commentedon Aug 24, 2023
I don't want to use Bounty Source, but I want to contribute another $300 raising the bounty
Total to $955
I can make payment through PayPal or Monero or other. If you are a mosh developer and accept then please let me know, as I will send you half ($150) immediately to begin development, and the other half after changes are merged into master or a testing branch
My offer to accept this job expires Jan 1 2024
My Session Messenger ID:
tsunamaru commentedon Aug 25, 2023
+$50 on Bounty Source from me. Counting above contribution from @Sepero, the total is now at $1005.
huyz commentedon Aug 25, 2023
What's the downside of BountySource? the 10% fee? Or these problems: bountysource/core#1586
Sepero commentedon Aug 25, 2023
I've used Bounty Source before and had problems with them, so I'd rather not have that again. Thank you @tsunamaru for helping push the bounty over $1000
tsunamaru commentedon Aug 25, 2023
Welp, I just read about Bountysource problems (thanks @huyz for pointing that out) and decided to ask PayPal for refund. I'm not sure if or when it'll be processed but regardless I will be happy pay my part to anybody after their changes is merged, would it be PayPal, crypto or any other suitable method.
keithw commentedon Aug 25, 2023
Folks, I don't want anybody to waste their money here -- I don't think the issue is about money; it's about changes people are asking for in the Mosh/SSP protocol. These protocol changes would have to be designed, and then implemented at both ends of the connection, and then supported. Think about other protocols or interchange formats you might want to change -- can you post a $1,000 bounty and get them to add a new field to TCP or a new tag to HTML? :-)
Adding support for reliable byte streams would be a big change to the Mosh protocol, and I don't sense anybody is eager to design, implement, and support this kind of major change. I think EternalTerminal can probably already do this; you might consider using that if you need reliable byte streams.
makeasnek commentedon Aug 25, 2023
Please do not use bountysource. Many devs have had trouble getting paid there. You can check out this lemmy community as an alternative https://lemmy.ml/c/bugbounties
For statements from devs who have been unable to cash out from bountysource see:
https://github.com/bountysource/core/issues
lonnywong commentedon Jul 1, 2024
huyz commentedon Jul 1, 2024
Ensure SSH stays up when forwarding ports (fixes mobile-shell#337)
Sepero commentedon Oct 23, 2025
Hey, that's fantastic. I should have a look at it. Thank you for your contribution.
lonnywong commentedon Oct 23, 2025
Shameless plug: Sorry for bothering you all before, and thanks @huyz @Sepero for your trust.
One more thing, @Drag0nFly is testing the latest tssh and tsshd and discussing it in the issue trzsz/trzsz-ssh#167 (comment).