Skip to contentNVTO
EN
Get started

Reference

nvto-connect CLI reference

nvto-connect is the renter's command-line client, for Windows and Linux and for anyone who prefers a terminal on a Mac; the NVTO Connect app for Mac runs its own copy of it inside. It signs in to the platform, lists your leases, and opens a leased machine's SSH and remote desktop on local ports of your computer. This page is the complete reference, written from the program's source: every command and flag, the files it touches and what it prints. For a guided first use, read the renter quickstart.

Last updated

Synopsis

Usage
nvto-connect login [-no-browser] [-api URL] [-events] [-dir DIR]
nvto-connect logout [-dir DIR]
nvto-connect status [-json] [-dir DIR]
nvto-connect leases [-json] [-dir DIR]
nvto-connect open LEASE_ID [-ssh-port PORT] [-vnc-port PORT] [-open-vnc] [-no-check] [-no-ssh-config] [-events] [-dir DIR]
nvto-connect test RESERVATION_ID [-events] [-dir DIR]
nvto-connect version
  • The first argument is the command. Flags follow it, in the form -flag value or -flag=value; two dashes work as well as one.
  • -h after any command lists that command's flags and exits with status 0.
  • Run with no command or an unknown one, it prints usage: nvto-connect <login|logout|status|leases|open|test|version> [flags] and exits with status 2.
  • Builds exist for macOS, Windows and Linux on x64 and ARM. The macOS builds are signed and notarized; the Windows and Linux builds are not signed, so check them against the SHA256SUMS file of the release.

login

Signs in through the browser and saves a session token: it shows a short code and opens the NVTO site, where you approve the code. This is the only way to sign in.

Flags of login
FlagTypeDefaultMeaning
-no-browserbooleanfalsePrint the sign-in address without opening a browser. Open it on any device, a phone for instance. See On a computer with no browser.
-apistring$NVTO_API, else https://app.nvto.comThe platform API URL. The value is saved with the session and used by leases and open.
-eventsbooleanfalseWrite progress as JSON lines on standard output, for the app. See Events.
-dirstringThe state directory; see FilesWhere session.json is written.
Terminal
$ nvto-connect login

To sign in, open this page and approve the code:

    https://app.nvto.com/authorize?code=BCDF-GHJK

    code: BCDF-GHJK

Approve only if the page is on nvto.com and shows this same code.
waiting for approval…
signed in
  • Connect asks the platform for a sign-in code, prints the address and the code to standard error, and opens the address in your default browser. If it cannot start a browser, it says so and keeps waiting: open the address yourself.
  • The code is eight letters in the form XXXX-XXXX and is valid for 10 minutes. Connect checks every 3 seconds whether it has been approved.
  • The address opens the Approve a sign-in page on the NVTO site. If you are not signed in there, the page has you sign in first and then brings you back. Check that the code matches your terminal, then choose Approve or Deny.
  • When you approve, Connect creates the state directory if needed (mode 0700), writes session.json (mode 0600) and prints signed in.
  • If you deny, it stops with the sign-in was denied on the website. If nobody approves within 10 minutes, it stops with the code expired; run nvto-connect login again. Ctrl+C stops the wait. In none of these cases is anything saved.
  • A session lasts 30 days. logout ends it sooner.

On a computer with no browser

On a computer with no browser, such as a server you reach over SSH, run nvto-connect login -no-browser. It prints the address and the code without trying to open a browser. Open the address on any other device, your phone or laptop for instance, sign in there if asked, check the code and approve it; the terminal then prints signed in.

Version 0.1.12 removed sign-in with a password, along with the -email flag and the password prompt in the terminal. For now -email is still accepted, so that older scripts do not stop on an unknown flag: it prints a note on standard error and signs in through the browser instead, so a script that used it now waits for you to approve the code.

logout

Ends the session on the platform, deletes session.json and prints signed out. The file is deleted even if the platform cannot be reached. If this computer is not signed in, it does nothing and exits with status 0. Sign out in the app does the same.

Flags of logout
FlagTypeDefaultMeaning
-dirstringThe state directoryWhere session.json is deleted from.
Terminal
$ nvto-connect logout
signed out

status

Says whether this computer is signed in, and to which account. It asks the platform, so a session that has expired shows as not signed in. It exits with status 0 either way.

Flags of status
FlagTypeDefaultMeaning
-jsonbooleanfalsePrint one JSON object: signed_in and, when signed in, email. If the platform cannot be reached, signed_in is true and unchecked holds the error.
-dirstringThe state directoryWhere session.json is read from.
Terminal
$ nvto-connect status
signed in as you@example.com
$ nvto-connect status -json
{"email":"you@example.com","signed_in":true}

leases

Lists your leases, newest first, at most 200. Prints no leases if there are none.

Flags of leases
FlagTypeDefaultMeaning
-jsonbooleanfalsePrint the leases as a JSON array of objects with id, term, price, status, starts_at and ends_at, the times in UTC. With no leases it prints [].
-dirstringThe state directoryWhere session.json is read from.
Terminal
$ nvto-connect leases
5b0c1f6e-2a4d-4e0b-9c57-3f1f0a7d2e91  active  week      30.03  ends 2026-11-19 10:42:07
9a41d0c3-77be-4f52-8d10-c2e6b5a90f14  ended   day        5.94  ends 2026-11-03 18:20:55
Columns of the output
ColumnMeaning
Lease IDThe identifier to pass to open.
Statusactive or ended. A lease past its end time shows as ended even before the platform has settled it.
Termday, week or month.
PriceThe rent paid for the current (or last) period, in balance units (1 USDT or 1 USDC each count as 1).
ends …When the current period ends, in your computer's local time.

open

Connects to the machine of one lease and keeps the connection up until interrupted. The lease ID may come before the flags or after them, not between them.

Flags of open
FlagTypeDefaultMeaning
-ssh-portinteger10022Local port for SSH. Listens on 127.0.0.1 only. 0 takes any free port; the port chosen is printed.
-vnc-portinteger15900Local port for remote desktop. Listens on 127.0.0.1 only. 0 takes any free port; the port chosen is printed.
-open-vncbooleanfalseStart the system's remote desktop viewer once connected. On macOS the remote-desktop password is filled in; on Windows and Linux, enter the one open prints. A failure to start it is logged and does not stop the command.
-no-checkbooleanfalseDo not check the machine against what was ordered. See Checking the machine.
-no-ssh-configbooleanfalseDo not name the machine nvto-<first 8 of the lease ID> in your SSH configuration while connected. See Files.
-eventsbooleanfalseWrite progress as JSON lines on standard output, for the app. See Events.
-dirstringThe state directoryWhere session.json, this computer's SSH key and the lease files are kept.

What it does, in order

  1. Asks the platform for a single-use overlay join key and the machine's overlay address (POST /v1/leases/{id}/overlay-key). Refused unless the lease is yours, active and not past its end.
  2. Makes this computer's SSH key if there is none yet and registers it with the lease (PUT /v1/leases/{id}/ssh-keys), so that the lease's machine lets it in.
  3. Joins the overlay as a temporary client named c-<lease-id>, keeping its state in a fresh temporary directory.
  4. Fetches a lease token (POST /v1/leases/{id}/connect-token), valid 10 minutes, and from then on fetches a new one whenever less than a minute is left.
  5. Listens on the two local ports. If either is taken it stops with local port <n>: ….
  6. Waits up to 90 seconds for the machine to accept this computer's key. Then it reads the two passwords NVTO Node left in the account renter, the remote desktop's (~/.nvto/desktop-password) and the account's (~/.nvto/account-password), without changing either; it writes the nvto-<first 8> SSH host entry unless -no-ssh-config is given, and creates or unlocks the private folder ~/Private. If the machine restarts while open is running, it unlocks the folder again once the machine is back. If the machine never accepts the key, the node has not given the lease a machine of its own: open says so and prints the plain local ports.
  7. For each local connection, dials the machine's gate over the overlay, presents the token for ssh or vnc, and pipes the bytes once the gate answers OK.
  8. Once the machine has accepted this computer's key, checks the machine in the background, unless -no-check is given or this computer checked the lease in the last 24 hours, and reports what it found (POST /v1/leases/{id}/check). See Checking the machine.
  9. Every 30 seconds, measures the path, logs it, and reports direct or relayed and the latency to the platform (POST /v1/leases/{id}/session).
  10. On Ctrl+C or a termination signal, closes every connection, removes the lease's SSH host entry and the temporary directory, and exits with status 0. When the platform reports the lease ended, it does the same and also deletes the lease's known-hosts file.
Terminal
$ nvto-connect open 5b0c1f6e-2a4d-4e0b-9c57-3f1f0a7d2e91 -open-vnc
2026/11/12 10:45:02 overlay up: c-5b0c1f6e-2a4d-4e0b-9c57-3f1f0a7d2e91 [100.64.0.9 fd7a:115c:a1e0::9]
2026/11/12 10:45:03 ready; leave this running while you use the machine, and press Ctrl+C to disconnect
2026/11/12 10:45:03   waiting for the machine to accept this computer's key
2026/11/12 10:45:09   ssh:             ssh nvto-5b0c1f6e
2026/11/12 10:45:09   editors:         VS Code or Cursor Remote-SSH, JetBrains Gateway: connect to host nvto-5b0c1f6e
2026/11/12 10:45:09   remote desktop:  open vnc://127.0.0.1:15900, password <desktop-password>
2026/11/12 10:45:09                    the machine logs the account renter in by itself
2026/11/12 10:45:09   account:         renter, password <password> (System Settings, installers and the login window ask for it)
2026/11/12 10:45:09   private folder:  ~/Private, an encrypted volume only this computer can unlock; it is locked whenever the machine stops
2026/11/12 10:45:09   The machine is yours for this lease, with sudo, and is erased when the lease ends.
2026/11/12 10:45:10 path: direct via 203.0.113.24:41641, 18.2 ms
2026/11/12 10:45:11 forward 127.0.0.1:53211 -> 100.64.0.5:7422: open
Log lines of open
LineMeaning
overlay up: c-<lease-id> [<addresses>]This computer has joined the overlay, with these overlay addresses.
ready; leave this running …Both local ports are listening.
waiting for the machine to accept this computer's keyThis computer's key is registered for the lease; open waits up to 90 seconds for the machine to let it in, then prints how to connect.
This node did not accept the key: …The node has not given the lease a machine of its own. Sign in with an account that exists on that machine.
could not add the machine to ~/.ssh/config: …The nvto- host name could not be written. The local port works all the same.
private folder: not available (…)~/Private could not be created or unlocked. The rest of the machine works.
path: direct via <ip:port>, <n> msTraffic goes peer to peer to that endpoint of the node.
path: relayed via DERP "<code>", <n> msTraffic goes through the relay in that region.
forward <local> -> <gate>: open / closedOne SSH or remote desktop connection started or finished.
forward <local>: dial upstream: gate: refused: <reason>The node's gate refused the connection. Reasons: no-active-lease, token-expired, unauthorized, protocol.
could not open the remote desktop: …-open-vnc could not start a viewer. Start one yourself.
checking the machine (about 15 seconds; it is busy meanwhile)The machine check has started.
machine check: matches what was ordered (<chip>, <n> cores, <n> GB memory, <n> GB disk)The platform found the machine to be what the node claims.
machine check: this machine does not match what was ordered:One line per problem follows, then a line saying either that NVTO has ended the lease and refunded its rent to your balance, or that the lease goes on. The node's owner and NVTO have been told. A mismatch found within the first 60 minutes of a new lease ends the lease and refunds the period's rent automatically, at most 2 times per renter in 30 days; see Connecting.
machine check: … / machine check could not be reported: …The check could not be finished or reported. Nothing is recorded, and the next open tries again.
the lease has ended; closingThe platform no longer issues tokens for the lease. The command exits.
lease <lease-id> has ended; disconnectingThe platform reports the lease as ended. The command exits.

Lines carry a date and time prefix. Passwords are printed only when standard error is a terminal; otherwise they read (not shown: standard error is not a terminal). The overlay library may print further lines of its own.

Checking the machine

Once the machine has accepted this computer's key, open checks it in the background while you work. It copies nvto-guest, Connect's measuring program for macOS on Apple silicon, into ~/.nvto-check on the machine and runs it there instead of the machine's own tools. For each timed job Connect picks a fresh random key; the program works on the AES-256-CTR keystream of that key and returns a SHA-256 for every chunk, and Connect recomputes a few chunks picked at random and compares. The program reads the chip, CPU cores, memory and disk; hashes 1 GiB on one core and 512 MiB on each core in parallel; fills 60% of the memory the machine reports, at most 24 GB, and reads it back in an order derived from the key; and writes 1 GiB to a temporary file, flushes it to the drive with F_FULLFSYNC, reads it back and removes it. Connect then receives 32 MiB through the tunnel and removes ~/.nvto-check. This takes about 15 seconds and keeps the machine busy meanwhile. A development build without nvto-guest uses the machine's sysctl, df, openssl and dd instead, and its speeds are not judged. Besides what it found, the report gives method (guest or tools), verified, failures (each job that did not finish or gave wrong answers), cpu1_mbps, cpun_mbps, memory_tested_bytes and memory_mbps. The platform compares the report with what the node claims and answers ok or mismatch, with the problems found; a mismatch notifies the node's owner and the operators. A computer checks the same lease at most once every 24 hours, recorded as checked_at in <state dir>/leases/<lease-id>.json, and the platform accepts one check per lease per hour. What is compared is set out under Security.

Events

With -events, login and open write one JSON object per line on standard output, each with an event field; the messages for people still go to standard error. This is how the NVTO Connect app follows what the client is doing. The events are meant for the app and may gain fields in later versions.

Terminal
$ nvto-connect open <lease-id> -events -ssh-port 0 -vnc-port 0
{"event":"listening","ssh_port":53122,"vnc_port":53123}
{"event":"ready","ssh_port":53122,"vnc_port":53123}
{"direct":true,"event":"path","latency_ms":18.2,"relay":""}
Events
EventFromFields
codeloginuser_code, verification_url, expires_in: the code to approve and where.
signed_inloginNone. The session has been saved.
listeningopenssh_port, vnc_port: the local ports, useful with port 0.
readyopenssh_port, vnc_port; ssh_key once this computer's key is registered for the lease; account, password (the account's) and desktop_password (the remote desktop's) once the machine has accepted it, or note if that failed; ssh_host once the SSH host entry is written; private, the private folder's path, or private_note if it could not be unlocked.
pathopendirect, relay, latency_ms, every 30 seconds.
private_unlockedopenNone. The machine restarted, and its private folder has been unlocked again.
checkopenverdict (ok or mismatch) and problems, with what was found: cpu, cores, memory_bytes, disk_bytes, tunnel_mbps; refunded and refund: whether the lease was ended and refunded, and the amount. Once the machine check has been reported.
lease_endedopenNone. The lease has ended and the command is about to exit.
closedopenNone. Every connection is closed.
errorAny commandmessage: the error, also printed to standard error.

test

Tests the connection to a machine reserved in Market before you order. Use the reservation ID shown there and a signed-in Connect session. The ID can come before or after the flags. The test sends its result to the platform for a rating and creates no lease or charge.

Flags of test
FlagTypeDefaultMeaning
-dirstringThe state directory (Files)Read the saved Connect session from this directory.
-eventsbooleanfalseWrite progress and the result as JSON lines to standard output. The human-readable summary goes to standard error.
Terminal
$ nvto-connect test 5b0c1f6e-2a4d-4e0b-9c57-3f1f0a7d2e91
Direct connection, 38 ms, jitter 4 ms, 52 Mbit/s down, 18 up — smooth: remote desktop should feel responsive

Without -events, the summary on standard output shows the path (direct or relayed), round-trip time, jitter, download, upload, and the platform's verdict. With -events, standard output carries test_started at the start of the test and test_result on completion. The result includes latency_ms, jitter_ms, down_mbps, up_mbps, direct, relay, and verdict. Errors reported by the command emit either test_failed with reason and message or error with message.

Exit status is 0 when the platform returns a rated result, including may_lag, or when you request help with -h. A test or session error, or a missing reservation ID, exits with status 1. An invalid flag exits with status 2.

version

Prints the program name, the build's version, and the operating system and architecture it was built for. -v and --version do the same. A build made without a version stamp prints dev.

Terminal
$ nvto-connect version
nvto-connect <version> darwin/arm64

Environment variables

Environment variables read by nvto-connect
VariableRead byEffect
NVTO_APIloginDefault for -api. Without it the default is https://app.nvto.com.

leases and open do not read it: they use the API URL and token saved by login.

Files and directories

The state directory, by operating system
SystemDefault state directory
macOS~/Library/Application Support/NVTO/connect
Windows%AppData%\NVTO\connect
Linux$XDG_CONFIG_HOME/NVTO/connect, or ~/.config/NVTO/connect when that variable is not set

If the system reports no user configuration directory, the state directory is nvto-connect in the current directory. -dir overrides it on any command.

Files
PathWritten byContents
<state dir>/session.jsonlogin; deleted by logoutJSON with two fields: api, the platform URL, and token, the session token. Mode 0600 on macOS and Linux; on Windows the directory is private to the user by its own permissions.
<temp dir>/nvto-connect-*openThe overlay client's throwaway state for one run. Removed when open exits.
<state dir>/id_ed25519, id_ed25519.pubopenThis computer's SSH key, made by the first open and registered with each lease so that the lease's machine lets it in. The private key is mode 0600.
<state dir>/leases/<lease-id>.jsonopenThe passphrase of that lease's private folder, and checked_at, when this computer last checked that machine. Mode 0600. The machine's passwords are not kept here: open reads them from the machine on every connection.
~/.ssh/configopen, onceOne line at the top, Include nvto/*.conf, under a comment saying NVTO Connect added it. It stays; nothing else in the file is changed. Not written with -no-ssh-config.
~/.ssh/nvto/<first 8>.confopen; removed when it disconnectsThe nvto-<first 8> host entry for one lease: 127.0.0.1, the SSH port, the user renter, this computer's key and the known-hosts file below. Not written with -no-ssh-config.
~/.ssh/nvto/known_hosts-<first 8>ssh, through that entry; deleted when the lease endsThe host key of that lease's machine, kept apart from your own known_hosts.

Lease tokens are held in memory only.

Exit status and errors

Exit status
StatusWhen
0The command succeeded; open was interrupted or the lease ended; -h was given.
1The command failed. One line is printed to standard error: nvto-connect: <message>.
2No command, an unknown command, or a flag that does not exist or has a bad value.

An error returned by the platform is printed as <message> (<code>). The codes this client can meet:

Platform error codes
CodeMessageFrom
rate_limitedtoo many attempts; try again laterlogin; open (12 join keys an hour per lease)
unauthorizedauthentication requiredleases: the session is missing or expired. open prints not signed in, or the session has expired; sign in again instead.
not_foundresource not foundopen: no such lease on this account. open prints this lease is not in the signed-in account instead.
lease_not_activethis lease has endedopen
node_not_reachablethe machine has not joined the network yet; try again shortlyopen
overlay_unavailablethe overlay network is not configured on this serveropen
http_errorHTTP <status>Any command: the answer was not from the platform's API, for example an error page from a proxy

What to do about each is in Connecting.

Examples

Terminal
# Sign in through the browser, then open the only active lease
$ nvto-connect login
$ nvto-connect leases
$ nvto-connect open <lease-id>
# Print the sign-in address without opening a browser; approve it on your phone
$ nvto-connect login -no-browser
# Two leases at once, each on its own ports
$ nvto-connect open <lease-a>
$ nvto-connect open <lease-b> -ssh-port 20022 -vnc-port 25900
# A second account, kept in its own state directory
$ nvto-connect login -dir ~/.nvto-other
$ nvto-connect open <lease-id> -dir ~/.nvto-other
# Let the system choose free local ports; the ports chosen are printed
$ nvto-connect open <lease-id> -ssh-port 0 -vnc-port 0
# Which account is this computer signed in to? Then sign it out
$ nvto-connect status
$ nvto-connect logout