Remote access your Raspberry Pi securely

Some people go even further and use a third-party service to help protect their Raspberry Pi. In this tutorial, we take a look at to set up a working network using the Raspberry Pi as a remote access gateway.

With, you can access a Raspberry Pi remotely without port forwarding. To do this, access the server as a proxy or use the software to form a peer-to-peer network. claims that this is a more secure way to set up a gateway than a traditional VPN.

Create an Account

To connect to your Raspberry Pi remotely, you’ll need to set up an account. Open your web browser and go to Click ‘Sign up’ and enter your email address. A verification code will be emailed to you. Enter this code and choose (and confirm) a password. Be sure to choose a strong password (read the How To Geek guide on strong passwords).

Enable SSH and VNC

To connect remotely, SSH and VNC must be enabled on the Raspberry Pi.

Click on the main menu and select Preferences > Raspberry Pi Settings. Choose the Interfaces tab and set both SSH and VNC to Enabled.

The VNC icon appears in the menu bar. Make sure you are not using the default password. (Select the System tab in Raspberry Pi Settings and click Change Password.) See the ‘Securing your Raspberry Pi’ article in the Raspberry Pi documentation for more information on how to keep your computer secure.

Update and Install

Make sure your Raspberry Pi is connected to the Internet (using wireless LAN or Ethernet cable). Open a Terminal window and enter the following commands:

sudo apt update sudo apt install remoteit

When packages are installed, Terminal generates the configuration information:

Proceed with setting up your device at http:// or http://raspberrypi.local:29999 or

The IP (Internet Protocol) address will be unique for your network.

Register the Raspberry Pi

Open the web browser on your Raspberry Pi and go to The window will search for devices running the software (including your Raspberry Pi).

See Also:  How to create a one color logo from photo

When your Raspberry Pi is found, the screen will show “Device not registered” along with the gateway details and the IP address. (If this approach doesn’t work, try one of the other two URLs listed in the setup information above.) Click Sign Up to add your Raspberry Pi to You will be asked to enter the email and password of your account.

The Name field displays ‘raspberrypi’ (you can change the name to something else if you prefer). The Services window displays the three default services: ssh, vnc, and Remoteit Admin Panel. Click Sign Up again to add the Raspberry Pi to your account.

Start a connection

You are now connected to the Raspberry Pi via There are two approaches: via a web service or using’s dedicated software.

First, let’s look at the web service. This provides a link to a proxy connection, and all data passes through one of’s proxy servers.

Open a web browser on your other computer and go to (enter your login credentials).

Click Connect and choose ‘Raspberry Pi – VNC’. The ‘VNC – Connection’ window appears, displaying the host and port information.

Connect via VNC Viewer

Open your VNC software (we’re using VNC Viewer) and select File > New Connection. Cut and paste the combined port and proxy information into the VNC server field. Ours looks like this:

Double-click the icon and click Continue in the alert window. Enter ‘pi’ as your Raspberry Pi OS username and password. Click OK to access the Raspberry Pi operating system desktop remotely.

Connect through the app

The downside of the web service is that all your data goes through a proxy computer. For a more private connection, the app for Windows and macOS allows you to form a Peer-to-Peer (P2P) connection.

The data does not pass through the servers (only the connection information), the data throughput is faster, so the screen response time is better and the The connection will remain active as long as both devices remain connected. Finally, the URL remains the same and can be bookmarked (unlike the proxy connection which has to be re-entered in VNC Viewer every time you start the connection).

See Also:  How to create an business email with exist domain

To create the P2P connection, you need to download the desktop software from Click ‘Get Desktop App’ from the website (or visit the download page) and click Download for Windows (or macOS, depending on your computer). Double-click the setup file and follow the installation instructions. Open the software You may see ‘We need to install or update our service to keep connections in the background’. Click Install Service and Yes to the User Account Control alert.

Enter your remote.Enter the account credentials in the app to log in.

Under Devices, you will see your Raspberry Pi. Click on it and click Connect next to VNC. The VNC icon will turn blue once connected.

You can start VNC Viewer directly from the application (using the launch icon) or copy and paste the connection information into VNC Viewer (as in the previous step).

Hide your port

You can access the Raspberry Pi remotely using However, your VNC port is now open and listening. You can verify this with the lsof (file list) command:

sudo lsof -i -P -n | grep LISTEN

In addition to the connection, it will show vncserver running on port 5900. The solution to this is to use a script, provided by, that hides this port. With the cloak script active, people cannot scan your Raspberry Pi to find the open port because the port will not respond to incoming traffic. Meanwhile, can get through because the software establishes the connection.

Uploading Scripts

You can use the script with any language running on your Raspberry Pi. It is best to practice with a test script. Navigate to the Upload a Device Script page on the website and click to download the file.

See Also:  How To Start A Vlog - Step by Step Guide For 2023

In the web interface, select Scripting and click Upload. Change the option to ‘Executable Script or Program’ and click ‘Choose File’. Use the File Explorer window to browse for the file and click Upload.

Run the script

Scripts are run from the Devices window. Put a check in the checkbox next to your Raspberry Pi and check next to ‘Show advanced columns’. (This will display state A, state B, state C, and any additional columns used by the test script.) Click Actions > Run Script; highlight and click Next.

Highlight the “Check to allow all devices to update status columns during job execution” box. (This option displays information in the columns as the script runs.)

The cloak script

Now download the script from the GitHub page. Load it in the same way as the script. And run it from the Devices window.

This time you will get two options in the Bulk Execution window: ‘Cloak Service’ and ‘Uncloak Service’. Highlight ‘Cloak Service’ and click Finish & Submit. Scripts can take a while to run. Choose Scripting in the sidebar and you will see the progress of the script. You can also cancel and kill scripts from this window.

On average, it takes three minutes for job status to update. Therefore, your script can complete and update cells before the job status catches up. You should reply in three to four minutes.

Hidden and Connected

Now connect to your Raspberry Pi via the app for a secure connection. Your port will be hidden on the Raspberry Pi and because you are connecting through the service, you will not share your IP and port information publicly. And the P2P service ensures that your data does not flow through the service.


Leave a Reply

Your email address will not be published. Required fields are marked *