Skip to main content

How to sign in to proximamp on a server without a browser

On a server, a Raspberry Pi or in a container without a browser, sign in with a code you approve on your phone. If nobody sits at the server, sign in with a device key. In a Docker container, this page's proximamp commands go after docker compose exec proximamp, and the key file and chmod stay on the computer (Docker).

Sign in from your phone​

  1. On the server, sign in with your phone:

    proximamp login --remote

    The command prints a link to the sign-in page, a QR code of that link and an 8-character code.

  2. Point your phone's camera at the QR code, or open the link on another computer, and sign in to your ProximaMP account with your password, VK ID or Yandex ID.

  3. Type the code from the server's screen on the page and approve the sign-in. The code works for 10 minutes; Ctrl+C on the server cancels.

  4. The command names the account that approved the code and asks whether to sign in to it. If it is your account, type yes within 2 minutes.

With a login, the command signs in only to that account and asks nothing:

proximamp login --remote alice

Without a terminal, in docker compose exec -T for one, the login is required.

Sign in with a device key​

A device key is a long password for a server, a service or a container. It opens tunnels; payments, the password, keys and devices are out of its reach.

  1. On a computer where you signed in with your password, VK ID, Yandex ID or a phone code, create a key:

    proximamp keys create --name build-server

    The command asks for your account password (for an account without one, add --vk or --yandex) and prints the key once. To let the key protect addresses, add --protection; to see the plan and usage, --usage; to expire in 30 or 90 days, --expires 90.

  2. On the server, sign in with the key:

    proximamp login --key

    When it asks for "Device key:", paste the key; it stays hidden as you type.

Without a terminal, in a script or in docker compose exec -T, give the key from a file: save the printed key as one line in key.txt, which only that user can read:

chmod 600 key.txt
proximamp login --key-stdin < key.txt

In PowerShell < doesn't work, and a file in your user folder is already out of other Windows users' reach:

Get-Content key.txt | proximamp login --key-stdin

Never put the key in a command's arguments: other users of the computer can see them. Up to 5 devices sign in with one key at the same time, and an account can have up to 20 active keys.

proximamp keys lists the account's keys and their ids. A revoked key signs its devices out and closes their tunnels. A device that signed in with a key signs in with it again after proximamp devices sign-out (the account's device list): to shut it out, revoke the key:

proximamp keys revoke <id>

Check​

On the server, run:

proximamp whoami

The command names the account, for example "Signed in as alice".