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

TCP Aliases support #35

Closed
dpishchukhin opened this issue Nov 1, 2019 · 3 comments · Fixed by #40
Closed

TCP Aliases support #35

dpishchukhin opened this issue Nov 1, 2019 · 3 comments · Fixed by #40
Labels
enhancement New feature or request

Comments

@dpishchukhin
Copy link

Hello @antoniomika,

Can you add TCP aliases to your great tool? I found this functionality by another tool.
Here are examples to explain what I want:

  • Create a TCP tunnel with alias: ssh -p 2222 -R myalias:22:localhost:22 ssi.sh
  • Connect to the tunnel: ssh -o ProxyCommand="ssh -W myalias:22 -p 2222 ssi.sh" user@myalias

I see a lot of advantages to this approach:

  • use the same port to create TCP tunnels
  • TCP tunnels could be named like subdomains for HTTP(S)
@antoniomika
Copy link
Owner

I see the use case, but is there any security concerns that should be worried about when a user set's up an alias? I guess since this is self hosted that wouldn't be as large of an issue. i will take a look though!

@antoniomika antoniomika added the enhancement New feature or request label Nov 6, 2019
@antoniomika
Copy link
Owner

Hey @dpishchukhin!

I just merged the PR that contains support for TCP aliases. They work more or less exactly how you listed (I tested it using an SSH proxy command also). The only thing to note is an alias is considered the pair of port and hostname (i.e. the alias is myalias:22, not just myalias).

The reason for this was to

  1. Provide less ability for enumeration, and
  2. Allow for reusing an alias name (think hostname) for a single SSH command with multiple forward requests. That is, something like:
    • ssh -p 2222 ssi.sh -R $(hostname):22:localhost:22 R $(hostname):8443:localhost:8443 can be used.

@dpishchukhin
Copy link
Author

Hi @antoniomika,

thank you, I'll test and provide you the feedback

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

Successfully merging a pull request may close this issue.

2 participants