Skip to content

Instantly share code, notes, and snippets.

@yvesf
Created December 10, 2022 18:42
Show Gist options
  • Save yvesf/597751ada42caabe123dcf43b7518b9a to your computer and use it in GitHub Desktop.
Save yvesf/597751ada42caabe123dcf43b7518b9a to your computer and use it in GitHub Desktop.
Remote access with i2p (experimental)

Remote access with i2p

I2P allows accessing the raspberrypi no matter where it's located as long as it's connected to the internet.

After first setup, on the RaspberryPi lookup and note down the i2p-address in the device (on RaspberryPi):

for f in /var/lib/i2pd/*keys; do echo "$f: $(head -c 391 $f | sha256sum | cut -f1 -d\  | xxd -r -p | base32 | tr '[:upper:]' '[:lower:]' | sed -r 's/=//g').b32.i2p"; done

On local computer start i2pd (and wait a bit):

nix run nixpkgs/nixos-21.11#i2pd -- --loglevel info

Configure SSH for i2p in ~/.ssh/config:

# ...
Host *.i2p
  ProxyCommand nc -X 5 -x localhost:4447 %h %p

Remote access with ssh:

ssh -l jack zld6wq3fixoua4466_________________q7exu5mq.b32.i2p

This works with nixos-rebuild for target-hostname as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment