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.
sudo remoteit help
remoteit help
Version
Get the version of CLI installed
sudo remoteit version
remoteit version
Example output
3.0.14
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.
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.
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.
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.
mkdir -p %USERPROFILE%\.remoteit
type nul > %USERPROFILE%\.remoteit\credentials
remoteit configure
You will be prompted to enter your key, secret and user defined profile name
You have successfully signed in with credentials over username and password
Sign Out
sudo remoteit signout
remoteit signout
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 can then add services to this device to allow other devices to connect to this device.
sudo remoteit register --name <name of your device>
remoteit register --name <name of your device>
List supported application types
This is referenced in adding a new service or modifying a service
sudo remoteit supportedApplications
remoteit supportedApplications
New application types are added all of the time, but common ones are listed below.
Example of adding service to "jump" to RDP on windows desktop on the LAN
remoteit add --name "my windows RDP" --port 3389 --type 28 --hostname "192.168.1.60"
Remove a service from this device
sudo remoteit remove --id <service id>
remoteit remove --id <service id>
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.
remoteit status
✓ Fetching status
Connections:
UID | Name | Type | Status | Address | Enabled | P2P | Failover
----------------------------------------------------------------------------------------------------------------------------------------------
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
Unregister This Device
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.
sudo remoteit unregister --yes
remoteit unregister --yes
Transfer
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.
Instructions for creating an access key and secret can be found .
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 .
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 . 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.
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 to get the service ID.
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 .
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 . The connection will be attempted as peer to peer (p2p) first with a proxy failover if allowed. In some cases such as https and http it will be a reverse proxy connection.
The connection will be generated in the background. Run the to retrieve the generated url in the Address column
The connection will be generated in the background. Run the to retrieve the generated url in the Address column.
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 and create the contact and then transfer the device from the devices list.
CLI has many more functions, examples provided here are the most common. You can use to explore other functions supported by your version such as graphQL query helper, upgrades, and more.