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
{{ message }}
Repository navigation
Add support for remote forwarding (reverse tunneling) #59
Follow the instructions here to set up a pbcopy daemon that listens on port 2224. That article has steps for testing the daemon to make sure it is correctly receiving requests.
Run EternalTerminal forwarding some port to 2224 on the local machine, e.g. et -t="2224:9999" <remote>:8080
Observe wackiness.
To confirm that plain ssh works, you could run:
ssh <remote target> -R2224:localhost:2224
and try hitting the port:
echo asdf | nc -c localhost 2224
The expected behavior is that "asdf" is now copied to your system clipboard.
changed the title [-]Using -t with pbcopy daemon leads to <CR>s being eaten[/-][+]Add support for remote forwarding (reverse tunneling)[/+]on Sep 1, 2017
Any prospects on getting remote tunnels? I am trying to make work rsubl (i.e. rmate for Sublime) via roaming terminal, but both mosh and ET don't deliver in this area 😭
Thanks for great project!
Alright, I tested this on my machines and it seems to work. I need other people to test before I can merge this in with confidence. This means you @michaelsuo@tonidy@bkarlson et al :-)
Please checkout branch reverse_tunnel, build the latest commit of that branch, and replace your et and etserver binaries on both client & server with the ones you build. Then you should be able to use reverse tunneling with the -rt command.
So, for example, to have the server communicate with a pbcopy daemon listening on port 2224:
et -rt="4321:2224" (hostname:port)
Then anything that goes to localhost:4321 on the server will be received by 2224 on the local machine. You can also do 2224:2224, but I made up 4321 so the example is easier to read.
This works great except that I have a RemoteForward option in my ~/.ssh/config that causes a port conflict when I also use et -rt. Can you cause et to always disable the RemoteForward option when calling ssh? It doesn't seem like it should ever be correct for it to be enabled in ssh when using et.
It would also be amazing to, in addition to the above comment, automatically parse the RemoteForward option that ssh would have used and apply it as an et -rt option.
@joshuarubin I think you should start a new issue for the ssh RemoteForward conflict as this one has been closed and I think it is important that this gets corrected.
Activity
MisterTea commentedon Sep 1, 2017
Ok I see the problem: this requires a remote forward, which is basically a tunnel in reverse. ET doesn't support this yet.
[-]Using -t with pbcopy daemon leads to <CR>s being eaten[/-][+]Add support for remote forwarding (reverse tunneling)[/+]MisterTea commentedon Sep 1, 2017
There is a second issue where when tunneling fails, it b0rks your terminal.
Prevent tunneling setup errors from causing terminal issues after exit.
bkarlson commentedon Oct 3, 2017
Any prospects on getting remote tunnels? I am trying to make work
rsubl(i.e.rmatefor Sublime) via roaming terminal, but both mosh and ET don't deliver in this area 😭Thanks for great project!
MisterTea commentedon Oct 3, 2017
@bkarlson We are working on implementing jump hosts now but once that is done we can take a look at reverse tunnels.
tonidy commentedon Jan 14, 2018
Same problem with @bkarlson, I need to use rmate for VS Code via terminal. Any progress on this issue @MisterTea ?
Thanks
MisterTea commentedon Jan 18, 2018
Sounds like this is the most needed feature that we don't already have :-). I should be able to code this up by next week.
MisterTea commentedon Jan 18, 2018
You can track progress by following this branch: https://github.com/MisterTea/EternalTCP/tree/reverse_tunnel
MisterTea commentedon Jan 18, 2018
Alright, I tested this on my machines and it seems to work. I need other people to test before I can merge this in with confidence. This means you @michaelsuo @tonidy @bkarlson et al :-)
Please checkout branch reverse_tunnel, build the latest commit of that branch, and replace your et and etserver binaries on both client & server with the ones you build. Then you should be able to use reverse tunneling with the -rt command.
So, for example, to have the server communicate with a pbcopy daemon listening on port 2224:
et -rt="4321:2224" (hostname:port)
Then anything that goes to localhost:4321 on the server will be received by 2224 on the local machine. You can also do 2224:2224, but I made up 4321 so the example is easier to read.
MisterTea commentedon Jan 30, 2018
Implemented in latest master.
joshuarubin commentedon Mar 21, 2019
This works great except that I have a
RemoteForwardoption in my~/.ssh/configthat causes a port conflict when I also useet -rt. Can you cause et to always disable theRemoteForwardoption when calling ssh? It doesn't seem like it should ever be correct for it to be enabled in ssh when using et.joshuarubin commentedon Mar 21, 2019
It would also be amazing to, in addition to the above comment, automatically parse the
RemoteForwardoption that ssh would have used and apply it as anet -rtoption.frederickjh commentedon Sep 5, 2019
@joshuarubin I think you should start a new issue for the ssh
RemoteForwardconflict as this one has been closed and I think it is important that this gets corrected.joshuarubin commentedon Sep 5, 2019
#228