Community Forum

How to retrieve ssh proxy setting via api?


I’m new to and very excited as it seems to respond to a need I’ve search a long time to resolve…

Basically, I want to have a Raspberry set in a remote location for remote backup purposes. I want to connect to it via ssh to push the backup. As it’ll be running nightly, it needs to be automatic…

I’ve tested the API documentation and been able to retrieve information concerning my Raspberry and the SSH service, but the “proxy” json entry looks like “” and doesn’t fit with the info I’m gathering with the console…

Is my approch wrong or is there another way to fetch the correct proxy setting?


After searching and reading, it looks like the way to do it is using the P2P connection, as explained here:

You can use the API or P2P connection approach. There are some network configurations, e.g. cellular on both ends or some symmetric NATs, where P2P won’t work properly.

Regarding the /device/connect API endpoint, in the example you gave, the hostname would be:

and the port would be:


Note that proxy URLs expire after 15 minutes if there is no activity on the connection, and after 8 hours regardless.