How to Set Up Secure IoT and Edge Device Management Without Open Ports
Updated on Dec 2, 2026 · 7 min read

IoT devices like Raspberry Pis rarely sit on a network you control. They live behind CGNAT, on cellular data or in a customer’s home, and you still need a shell on them the day something breaks.
The usual way in is a chore. You forward a port on the router (if the ISP even gives you a public IP), open it in the firewall, set up sshd, then copy SSH keys to every device and keep them in sync as people join and leave. After all that, each connection still needs the right IP, port and key, and every forwarded port is one more thing on the internet to watch. Multiply it by a few dozen Pis on a few dozen networks and most of your time goes into plumbing.
This guide shows how we can manage a Raspberry Pi fleet with Pinggy Devices instead. One install command connects a device, and from then on we open a terminal, edit files and see who connected, all from the browser, with no port forwarding, firewall rules or SSH keys. We tested it on a Mac.
Summary
- One simple command to set up remote access.
curl -fsSL https://pinggy.io/install.sh | shinstalls the agent withoutsudo; a device token does the same with no keyboard, so it fits a fleet rollout. - A terminal in the browser. The Terminal tab opens shells that survive a closed tab, with no SSH server, keys or open ports on the device.
- Files without SCP. The Files tab browses, renames, copies, moves and deletes files on the device. Turn it off where you don’t need it with
pinggy device connect --files off. - One place to control access. Turn on 2-factor authentication, remove a device from the dashboard, and see who connected in the Activity tab.
What managing a Raspberry Pi fleet takes
For example, say we want to manage a fleet of Raspberry Pi 5 boards on customer sites, one of which is pi-0042. We need a shell when something breaks, a quick way to fix a config file, and a record of who connected. With Pinggy Devices each of those is a tab in one dashboard, and the Pis need nothing opened on the customer’s network.

Step 1: Connect each device with one command
Pinggy Devices runs the Pinggy CLI as an agent on the device. The agent dials out to Pinggy and keeps that connection open, so there’s no port to forward, no public IP to find and no SSH server to set up, and it works behind CGNAT too. On a single device, run:
curl -fsSL https://pinggy.io/install.sh | shThe script needs no sudo. It puts the binary in ~/.pinggy/bin/pinggy, then runs pinggy device login, which asks for your email and prints a Device Code. You recieve a 6-digit code by email to type in. If you approve from the email instead, check that the page shows the same Device Code; a different one means someone else started that sign-in.
For a fleet, the dashboard’s Add device button gives a command with a device token that needs no keyboard, so it works from a provisioning script. Here’s what it printed when we connected a Mac (token, device ID and email replaced, download lines trimmed):
$ curl -fsSL https://pinggy.io/install.sh | DEVICE_AGENT_TOKEN=<TOKEN> sh
Installed pinggy 0.6.11 to ~/.pinggy/bin/pinggy
Manage this device:
pinggy device status Show this device, and whether its agent runs
pinggy device stop Stop the agent until the daemon starts again. The device shows offline
pinggy device start Start the agent again after a stop
pinggy device connect Same as start
pinggy device remove Stop the agent and forget this machine's credential
Starting the device agent in the background...
✔ Success: Running in the background as device <device-id>
Signed in as you@example.com
Start pinggy automatically when this computer starts? [Y/n] n
To start pinggy when this computer starts, run: pinggy daemon service-installOn an unattended device, answer y to that last question or run pinggy daemon service-install afterwards, so the agent comes back after a power cut. Two Raspberry Pi gotchas: the install script only ships x64 and arm64 binaries built against glibc, so you need the 64-bit Raspberry Pi OS, and on musl systems such as Alpine you install with npm install -g pinggy instead.

Screenshot: pinggy.io/remote-terminal.
Step 2: Open a terminal from the browser
Open the device in the Pinggy Devices dashboard, go to the Terminal tab and click New shell. Each shell gets its own tab. There’s no IP to look up and no key to load: if the device shows online, you’re one click from a prompt.
Edge devices tend to have flaky networks, and the terminal is built for that. A shell keeps running when you close the browser tab or the device’s connection drops for a while, and reopening the tab redraws the screen as you left it, so a long apt full-upgrade on a 4G link survives. Shells end on exit, after 30 minutes idle, after 8 hours regardless, or when the agent stops; anything longer belongs in tmux or a systemd unit.
The shell runs as the user who started pinggy, so start the agent as a normal account and use sudo when you need it. Per the Devices docs, Free covers 1 device with 1 shell; Pro and Enterprise allow 25 devices and 25 open shells per seat, at most 10 on one device.
Step 3: Manage files without SCP
The Files tab (CLI 0.6.11 or later) replaces the SSH-and-scp routine for fixing a file. It opens in the agent user’s home folder and lets you browse (hidden files included), check permissions and owners, make folders, and rename, copy, move or delete, which covers most “fix one config file” jobs.

The Files tab on a connected Mac, with a row’s menu open. The device name and username are blurred.
A few limits to know. Changes run with the agent user’s permissions, and delete has no trash. Pinggy won’t delete or move system folders, home folders, its own files or a mounted disk. There’s no upload or download, so to get a new file onto the device, fetch it from the Terminal tab.
File access is a per-device switch, and the person at the machine controls it. pinggy device login and pinggy device connect ask once whether the dashboard may reach the files. Change it later with:
pinggy device connect --files off # refuse file access from the dashboard
pinggy device connect --files on # allow it again
pinggy device status # shows whether file access is onA token install has no terminal to ask, so file access starts on. If some devices don’t need it, add pinggy device connect --files off to your provisioning script.
Step 4: Control who can reach your devices
With Pinggy Devices, access lives in one place: anyone who can sign in to your Pinggy account can open a shell on every device. Turn on 2-factor authentication and only invite the people who need it. To cut a device off, delete it or rotate its token in the dashboard; pinggy device remove only forgets the token on the machine itself.

Screenshot: pinggy.io/remote-terminal, with example IP addresses.
The Activity tab lists each device’s events, such as shells opened and closed, with source IP addresses, so you can see who connected and when. File changes from the Files tab don’t show in it.
Troubleshooting
A greyed-out Terminal or Files tab means the device’s CLI is too old (Files needs 0.6.11); run the install command again. File access is off on this device means someone ran --files off.
Your plan allows 1 device means the Free plan is full. If the agent says its token was refused or revoked, the device was deleted or its token rotated, so add it again. A device that goes offline after every reboot was never set to start at boot; run pinggy daemon service-install on it.
Conclusion
Start with one Pi: run the install command, open a terminal in the browser and fix a file in the Files tab. Then put the token command in your provisioning script, turn on 2FA, and roll it out to the rest of teh fleet.