CLI Usage
The remote.it CLI has slightly different behavior if you are running as a root user versus a non-root user. In general, you will want to run as a root user, though there are a couple cases where you don't. These will be made clear.
  • On Windows, you will need to open a "Command Prompt" as an Administrator
  • On Mac and Linux, you must run any commands related to creating/managing a Device or Services as a root user (e.g.sudo)

Help

List the available commands.
Linux/Mac
Windows
1
sudo remoteit help
Copied!
1
remoteit help
Copied!

Version

Get the version of CLI installed
Linux/Mac
Windows
1
sudo remoteit version
Copied!
1
remoteit version
Copied!
Example output
1
1.8.7
Copied!

Account

With 2FA enabled, you'll need to provide an authentication code when accessing remote.it through your browser, desktop and mobile apps. If you access remote.it using other methods, such as the API or the CLI, you'll need to sign in with credentials using an access key and secret.

Sign In

Without the user and pass options it will prompt for the username and password.
Linux/Mac
Windows
1
sudo remoteit signin --user <remote.it username> --pass <password>
Copied!
1
remoteit signin --user <remote.it username> --pass <password>
Copied!

Sign in with Credentials

For accounts that have 2FA enabled OR do not have a username and password (i.e. Google sign in), you can still use the CLI. In this situation, the CLI will use a credentials file which contains an access key and access key secret to execute all CLI commands.
Instructions for creating an access key and secret can be found here.
Linux/Mac
Windows
If you switch to using credentials with the CLI sudo privileges are no longer required when running many of these commands on the device. All subsequent calls will need to be made by the same user.
Create a credentials file in the .remoteit directory of the user home directory, if it doesn't already exist.
1
mkdir -p ~/.remoteit
2
touch ~/.remoteit/credentials
Copied!
1
remoteit configure
Copied!
You will be prompted to enter your key, secret and user defined profile name
1
key : R3_ACCESS_KEY_ID
2
secret : R3_SECRET_ACCESS_KEY
3
profile: default
Copied!
You must then enable the active profile
1
remoteit configure --profile default --enabled
Copied!
You have successfully signed in with credentials over username and password
If you switch to using credentials with the CLI all commands can be run from a non-adminstrative command prompt. All subsequent calls will need to be made by the same user.
Create a credentials file in the .remoteit directory of the user account which will be using the CLI, if it doesn't already exist.
1
mkdir -p %USERPROFILE%\.remoteit
2
type nul > %USERPROFILE%\.remoteit\credentials
Copied!
1
remoteit configure
Copied!
You will be prompted to enter your key, secret and user defined profile name
1
key : R3_ACCESS_KEY_ID
2
secret : R3_SECRET_ACCESS_KEY
3
profile: default
Copied!
You must then enable the active profile
1
remoteit configure --profile default --enabled
Copied!
You have successfully signed in with credentials over username and password

Sign Out

Linux/Mac
Windows
1
sudo remoteit signout
Copied!
1
remoteit signout
Copied!

Device and Service

Register

Registers this device to your account to allow access. This is not needed if you only need to initate a connection to another device. Once registered you can no longer register this device.
If you need to re-register, unregister first, then register. If you just need to move the device to another account, use transfer.
After registration, you will then need to add services to this device to support connections
Linux/Mac
Windows
1
sudo remoteit register --name <name of your device>
Copied!
1
remoteit register --name <name of your device>
Copied!

List supported application types

This is referenced in adding a new service or modifying a service
Linux/Mac
Windows
1
sudo remoteit supportedApplications
Copied!
1
remoteit supportedApplications
Copied!
New application types are added all of the time, but common ones are listed below.
1
ID | Name | Default Port | Protocol | Description
2
-------------------------------------------------------------------------------------------
3
42 | Admin Panel | 29999 | TCP | remote.it admin panel
4
43 | Terraria | 7777 | TCP | Terraria server
5
8 | HTTPS | 443 | TCP | Secure web protocol
6
8 | HTTPS | 443 | TCP | Secure web protocol
7
8 | HTTPS | 443 | TCP | Secure web protocol
8
28 | SSH | 22 | TCP | Secure shell terminal
9
4 | VNC | 5900 | TCP | VNC remote desktop
10
34 | SMB/CIFS | 445 | TCP | Internet file sharing
11
32770 | WireGuard | 51820 | UDP | WireGuard VPN server
12
32771 | Minecraft Bedrock | 19132 | UDP | Minecraft Bedrock server
13
1 | TCP | 0 | TCP | Generic TCP
14
41 | Minecraft | 25565 | TCP | Minecraft server
15
7 | HTTP | 80 | TCP | Web protocol
16
5 | RDP | 3389 | TCP | Microsoft remote desktop
17
39 | OpenVPN | 1194 | TCP | OpenVPN server
18
7 | HTTP | 80 | TCP | Web protocol
19
32769 | UDP | 0 | UDP | Generic UDP
20
37 | NxWitness | 7001 | TCP | Nx Witness VMS
21
38 | Nextcloud | 443 | TCP | Nextcloud hub
Copied!

List services and status on this device

You can add an option of --j or --json to output the results in JSON
Linux/Mac
Windows
1
sudo remoteit status
Copied!
1
remoteit status
Copied!
Example output
Device and services are this device information. Connections are connections from this device to other services.
1
Device:
2
UID | Name | Type | Status | Address
3
------------------------------------------------------------------------------------------------------------------------------
4
80:00:XX:XX:XX:XX:XX:C6 | My-MBP-15 | device | connected | 127.0.0.1:65535
5
6
7
Services:
8
UID | Name | Type | Status | Address | Enabled
9
-----------------------------------------------------------------------------------------------------------------------------------------
10
80:00:XX:XX:XX:XX:XX:C6 | vnc | VNC (4) | connected | 127.0.0.1:5900 | true
11
80:00:XX:XX:XX:XX:XX:C6 | remoteit admin | Admin Panel (42) | connected | 127.0.0.1:29999 | true
12
80:00:XX:XX:XX:XX:XX:C6 | ssh | SSH (28) | connected | 192.168.1.60:3389 | true
13
14
15
Connections:
16
UID | Name | Type | Status | Address | Enabled | P2P | Failover
17
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18
80:55:XX:XX:XX:XX:XX:C6 | rds-mssql-replica | TCP (1) | ready | someservice.at.remote.it:33002 | true | false | false
19
80:00:XX:XX:XX:XX:XX:C6 | Minecraft SSH | SSH (28) | ready | minecraft-ssh.at.remote.it:33001 | true | false | false
20
Copied!

Add a new service on this device

Adds a new service to this device. This will define a remote.it Service which is running on this machine. NOTE: This does not detect if the actual service is running on this machine. The type option will accept either the ID or Name of an application type and is not case sensitive. Available service types can be found here.
Linux/Mac
Windows
1
sudo remoteit add --name <service name> --port <service port> --type <application type>
Copied!
Example adding an SSH service
1
sudo remoteit add --name "my ssh service" --port 22 --type 28
Copied!
1
remoteit add --name <service name> --port <service port> --type <application type>
Copied!
Example adding an SSH service
1
remoteit add --name "my ssh service" --port 22 --type 28
Copied!
You can also add a service which connects to an application on another device on the same LAN. This is also referred to as a jumpbox. The host name can be either an IPv4 IP address or mDNS address (i.e. raspberrypi.local) of the device which is running the application.
Linux/Mac
Windows
1
sudo remoteit add --name <service name> --port <service port> --type <application type> --hostname <hostname>
Copied!
Example of adding service to "jump" to RDP on a windows desktop on the LAN
1
sudo remoteit add --name "my windows RDP" --port 3389 --type 28 --hostname "192.168.1.60"
Copied!
1
remoteit add --name <service name> --port <service port> --type <application type> --hostname <hostname>
Copied!
Example of adding service to "jump" to RDP on windows desktop on the LAN
1
remoteit add --name "my windows RDP" --port 3389 --type 28 --hostname "192.168.1.60"
Copied!

Remove a service from this device

Removes a service from this device. This will cause a disconnect for all other users who had an active connection to this service. If you are concerned about the disconnect, you can use the graphQL API to fetch active connection to this service and then notify users accordingly. Use the status command to get the service ID.
Linux/Mac
Windows
1
sudo remoteit remove --id <service id>
Copied!
1
remoteit remove --id <service id>
Copied!

Modify a service on this device

Modifies a service on this device. This will cause a disconnect for all other users who had an active connection to this service. If you are concerned about the disconnect, you can use the graphQL API to fetch active connection to this service and then notify users accordingly.
The enabled option disables the service without deleting it. The hostname option will modify a service which connects to an application on another device on the same LAN. The host name can be either an IPv4 IP address or mDNS address (i.e. raspberrypi.local) of the device which is running the application. The type option will accept either the ID or Name of an application type and is not case sensitive. Available service types can be found here.
Linux/Mac
Windows
1
sudo remoteit modify --id <service id> --enable <boolean> --port <port> --hostname <hostname> --type <application type>
Copied!
1
remoteit modify --id <service id> --enable <boolean> --port <port> --hostname <hostname> --type <application type>
Copied!

Generate peer to peer connection to service

Once you have created a service on a target device you can generate a a persistent address on demand connection from the CLI on your initiator device. This requires the service id and local port. Verify there are not other connections on the local port before generating. Learn more about peer to peer vs proxy.
Linux/Mac
Windows
1
sudo remoteit connection add --id <service id> --port <port> --p2p true
Copied!
The connection will be generated in the background. Run the status command to retrieve the generated url in the Address column
1
sudo remoteit status
2
✓ Fetching status
3
4
Connections:
5
UID | Name | Type | Status | Address | Enabled | P2P | Failover
6
----------------------------------------------------------------------------------------------------------------------------------------------
7
80:07:06:01:20:30:40:50 | service name | SSH (28)| online | <device_name>-<service_name>.at.remote.it:<local_port> | true | true | false
Copied!
1
remoteit connection add --id <service id> --port <port> --p2p true
Copied!
The connection will be generated in the background. Run the status command to retrieve the generated url in the Address column.
1
remoteit status
2
✓ Fetching status
3
4
Connections:
5
UID | Name | Type | Status | Address | Enabled | P2P | Failover
6
----------------------------------------------------------------------------------------------------------------------------------------------
7
80:07:06:01:20:30:40:50 | service name | SSH (28)| online | <device_name>-<service_name>.at.remote.it:<local_port> | true | true | false
Copied!

Unregister

Unregister this device from your account and removes the services. This will also remove access to this device for any users to which you have shared this device. This will cause a disconnect for all other users who had an active connection to this service as well. If you are concerned about the disconnect, you can use the graphQL API to fetch active connection to this service and then notify users accordingly. Once unregistered, this device can be registered again.
Linux/Mac
Windows
1
sudo remoteit unregister --yes
Copied!
1
remoteit unregister --yes
Copied!

Transfer

Transfer this device and defined services to another account. This will remove your access to this device along with any users to which you had previously shared this device. This will cause a disconnect for all other users who had an active connection to this service. If you are concerned about the disconnect, you can use the graphQL API to fetch active connection to this service and then notify users accordingly. If the account doesn't exist, the transfer will fail. If this is the case, you can sign-in to the web portal and create the contact and then transfer the device from the devices list.
Verify the email address used for the transfer is correct. This device will transfer to the email address provided and cannot be undone. The new owner would need to transfer the device back to you.
Linux/Mac
Windows
1
sudo remoteit transfer --to <email address>
Copied!
1
remoteit transfer --to <email address>
Copied!