💾 Archived View for perso.pw › blog › articles › kermit-command.gmi captured on 2023-06-16 at 16:46:48. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-05-24)

➡️ Next capture (2024-03-21)

-=-=-=-=-=-=-

Kermit command line to fetch remote files through ssh

on Mastodon

I previously wrote about Kermit for fetching remote files using a kermit

script. I found that it's possible to achieve the same with a single kermit

command, without requiring a script file.

Given I want to download files from my remote server from the path

using inetd:

File **/etc/inetd.conf**:

7878 stream tcp nowait solene /usr/local/bin/kermit-sshsub kermit-sshsub

I can make a ssh tunnel to it to reach it locally on port 7878 to download my files.

kermit -I -j localhost:7878 -C "remote cd /home/mirror/pub","reget /recursive .",close,EXIT

Some flags can be added to make it even faster, like `-v 31 -e 9042`. I insist

on kermit because it's super reliable and there are no security issues if

running behind a firewall and accessed through ssh.

Fetching files can be stopped at any time, it supports very poor connection

too, it's really reliable. You can also skip files, because sometimes you need

some file first and you don't want to modify your script to fetch a specific

file (this only works if you don't have too many files to get of course because

you can skip them only one by one).