TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Public SSH Jump and Port Forwarding Server

22 pointsby ValdikSSabout 4 years ago
I&#x27;ve made a neat service to access SSH over NAT. Unlike ngrok and alternatives with registration, custom software, non-preserved random URLs and ports, this solution is just a remote SSH server which does not require anything more than an SSH client to both host and connect.<p>Technically it allows to publish any service over SSH (web, proxy, any TCP port really), but only with SSH as a destination you&#x27;ll preserve end-to-end encryption and won&#x27;t allow my server to snoop on potentially unencrypted traffic.<p>The service is mostly intended to give remote access to the device as fast as possible, given it already has SSH client and server.<p>To begin, just execute:<p><pre><code> ssh ssh-j.com </code></pre> Would be grateful for any feedback.<p>-----<p>Looking for ways to expose SSH behind NAT? Search no further!<p>Publish SSH server port of your laptop, which is behind NAT:<p><pre><code> ssh any-username@ssh-j.com -N -R laptop-behind-nat:22:localhost:22 ╭─╯ unique ╰─╮ │ device name ╭───╯ │destination│ │ namespace │ │ and port │ │address and│ │for your hosts│ ╰──────────────╯ │ port │ ╰──────────────╯ ╰───────────╯ </code></pre> Connect to the published SSH:<p><pre><code> ssh -J any-username@ssh-j.com laptop-behind-nat ↖ It&#x27;s THAT easy! </code></pre> Published hosts are bound to the username. Other usernames can&#x27;t access them. Pick a unique username (not root ) and get access to your devices anywhere!

3 comments

kimusanabout 4 years ago
any way to use this for e.g. vnc forwarding directly? I mean, I can set it to be available via ssh but would that work?<p>ssh someuser@ssh-j.com -N -R some-pc:5901:localhost:5901<p>Now do I reach this from my vnc? I need the &quot;someuser&quot; and -J part when connecting? Would I have to setup another ssh connection from my local pc to ssh-j and then use localhost:5901 in vnc?
mbreeseabout 4 years ago
How does this part work:<p>-R laptop-behind-nat:22:localhost:22<p>This should open port 22 on the ssh-j.com server and connect it back to the laptop-behind-nat:22 , but this is already open. So, you&#x27;re doing some firewall trickery to redirect 127.0.0.1:22 to a different port based on the username? And sshd isn&#x27;t listening on 127.0.0.1:22?<p>If so, could a person also try:<p>-R laptop-behind-nat:22:localhost:22222<p>-R laptop-behind-nat:22:localhost:22223<p>-R laptop-behind-nat:22:localhost:22224<p>And try to find other tunnels that are open? Or is this also handled somehow in the firewall? I always try to avoid using ports for tunnels if I can avoid it on multi-user systems for this reason. This means using Unix sockets as much as possible for the permissions&#x2F;security aspects. However, that also means that whatever tool I&#x27;m using also has to support Unix sockets. And in your case it would mean letting random people create &quot;file&quot; sockets on a server, which isn&#x27;t necessarily a good idea.
评论 #26510910 未加载
ctocoderabout 4 years ago
pretty cool, I build this stuff with containers to reach databases in different locations. This is a really cool simple powerful product for general use.