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.