-- Leo's gemini proxy

-- Connecting to perso.pw:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;

Kermit command line to fetch remote files through ssh


Author: Solène

Date: 15 May 2019

Tags: kermit


NILI 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

**/home/mirror/pub** and that I've setup a kermit server on the other part

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).

-- Response ended

-- Page fetched on Thu Apr 18 03:18:44 2024