Re:Show HN: An SSH based utility to transfer pipes across ma...
by f-az on Saturday January 04, 2025 @04:50AM
(#42593758)
After reading the readme I’m confused what the advantage is over just regular piping.
‘’’
command-on-server1 | ssh user@server2 'command-on-server2'
‘’’
[ Parent
| on HN ]
Re:Show HN: An SSH based utility to transfer pipes across ma...
by unsnap_biceps on Saturday January 04, 2025 @05:16AM
(#42593839)
I think a fully equivalent would be to use socat
On Receiving Server
ssh user@proxy socat UNIX-RECVFROM:/tmp/foobar -
And then on sending server ./foobar | ssh user@proxy socat - UNIX-SENDTO:/tmp/foobar
Re:Show HN: An SSH based utility to transfer pipes across ma...
by fulafel on Saturday January 04, 2025 @04:57AM
(#42593780)
The remote ssh server used in the demo seems to be a proxy service so apparently it's for cases where you can't ssh in to your example's server2.
Re:Show HN: An SSH based utility to transfer pipes across ma...
by remram on Saturday January 04, 2025 @11:17AM
(#42595603)
I think you can turn this (or any equivalent service like ssh-j.com) into an end-to-end encrypted option by relaying an SSH connection over which you send the data, instead of relaying the data.
Example:
# receiver
ssh [email protected] -N -R ssh:22:localhost:22
socat UNIX-RECV:/tmp/foobar - | my command
# sender
my-command | ssh -J [email protected] ssh socat - UNIX-SENDTO:/tmp/foobar
(log in with your creds to receiver host, enjoy end-to-end encryption)
Re:Show HN: An SSH based utility to transfer pipes across ma...
by ksdme9 on Saturday January 04, 2025 @05:08AM
(#42593821)
Beam lets you do what you described even when both the machines are isolated and not reachable from one another. All you need is ssh clients on both the machines.
Re:Show HN: An SSH based utility to transfer pipes across ma...
by hnlmorg on Saturday January 04, 2025 @05:14AM
(#42593833)
That’s not clear in the readme. It might be worth explicating stating that this uses the SSH protocol but is designed to work on hosts that either dont have OpenSSH enabled or environments where you don’t control the OpenSSH config.
Given the current readme, I was left wondering the same as the GP too.
Re:Show HN: An SSH based utility to transfer pipes across ma...
by ksdme9 on Saturday January 04, 2025 @05:31AM
(#42593889)
Thanks, makes sense. I'll update the readme.
Re:Show HN: An SSH based utility to transfer pipes across ma...
by alanfranz on Saturday January 04, 2025 @05:57AM
(#42593963)
But if you have ssh clients on both machines, you can use port forwarding to allow machine2 to connect to machine1 via ssh. Or you can connect both machines to the "SSH stun server" (which is something like the beam host if I understand correctly) and let them connect through that.
I mean, I'm not bashing beam, but it's mostly syntactic sugar, not something that provides some actual new functionality, is that right?
Re:Show HN: An SSH based utility to transfer pipes across ma...
by ksdme9 on Saturday January 04, 2025 @07:07AM
(#42594244)
Yup, you are right.
You can do this using a regular SSH server and some elbow grease. This is meant to be a simple setup and forget system that is relatively locked down and doesn't expose any more functionality than strictly necessary.