Hacker News new | ask | show | jobs
by forcedtolinux 6 days ago
Is there any way you can download files from the filesystem?
1 comments

No, there isn't any good way. So I just made a file relay for you, you can use that.

file relay:

https://ezmon-e.com/utilities/file-relay

video of how it works:

https://youtu.be/rQQOzNHQL9A

you should check the hashes of any files you get from a relay like this, I don't think my server is running any malware but it could always get infected in the future, the vulnerability surface these days is enormous.

No need for a new relay, really. If you add croc in the VM, it will generate either a link you can download from in any other browser or via croc installed on the machine you wish to download to.

croc will establish a direct udp between two terminal clients or use their relay only if you want to use the web version for either upload/download. And it's e2e encrypted when using the croc servers.

Just tried it with a couple random wikipedia images downloaded via curl to the VM and via croc to my machine. No problems.

Thank you! I tried it and it works well. Very useful and easy to use, since it's just one line

    croc send [file(s)-or-folder]
screenshot:

https://imgur.com/a/tqibr0D

also works on folders (directories). It's a good project, I donated to its author.

croc is my number one favorite under-used under-rated projects.

Literally any two devices on just about any internet connected device, supposing only that you're not on a super locked down corporate network can share files and now even ssh sessions so you can croc in to an existing ssh session if you want to have a single ssh session shared across multiple devices.

Love that you donated!

thanks for sharing. what do you mean by croc in to an existing ssh session, could you explain a bit more?
>croc ssh

generates one persistent shell with two seperate six sword croc secrets, one for someone with read/write, and one for someone with read-only. You can then croc $secret_words in a seperate terminal (on another internet connected machine if you want), and IO in the original terminal will be mirrored to the observing terminal.

If the mirroring terminal has read/write, commands typed there are executed in the 'host' terminal.

If the mirroring terminal only has read, you can use it to monitor a long running job, server logs, or to share with someone for support like RDP/share my screen, or I suppose to give a presentation on a machine that doesn't have all of your tooling from a laptop with croc...if you're in a weird combination of instances in which you have both a group to show your terminal to and don't have direct access to your terminal.

You can do all of this without configuring ssh on the public/other machine, so if, for instance, you had an ssh session on one machine, and needed to access that ssh session from a machine where you don't have (and perhaps don't want) your ssh key to sit, you can croc from the public machine to your private running ssh.

I typically use it for when I just want a quick "hey can you check what I'm doing here" because I don't have to set up/manage ssh keys as the croc keys only live as long as I want them to. Or the reverse, "this is what you're going to type and what you should see" without creating a recording/screenshare.

I also have a dynamic IP at home and don't really care to set up tailscale and/or vpn to my home machine so if I feel I might need access to my machine i can run croc before leaving and connect from just about anywhere.

And it still all works either cli/web.

Check it out: https://getcroc.com/blog/share-terminal-with-croc-ssh

edit: oh! and you can >croc relay on say a server and then you can use your own routing instead of the public croc relay for the web clients