How To
Approve a Phone on a Server
Add your phone's key to a Linux server, or any host without a screen, with pocketty approve.
On a Mac, the daemon asks for the code in a native alert. On a server with no screen, you type the code in a terminal.
Steps
-
On the phone, start code setup: tap the host under Nearby, or tap Send key to host.
-
In an SSH session on the server, run:
pocketty approve -
It waits for the request, then asks for the code:
Waiting for a device. In pocketty, tap Send key to host. A device named "Luke's iPhone" wants to connect to this host. Tailscale identifies it as lukes-iphone from the Helen network. Enter the code shown on lukes-iphone to approve this connection: 482913 Approved. lukes-iphone can connect now. -
The phone says Key added for your user. Tap Save.
You can start pocketty approve before or after you tap Send key to host. An empty answer denies the request.
Approve with One Command
If you can see the code already, pass it in:
pocketty approve 482913
To turn a request down:
pocketty deny 482913
See What Is Waiting
pocketty requests
lukes-iphone luke@example.com Luke's iPhone expires in 94s
A request expires after 2 minutes. At most four can wait at once, and each phone can have only one.
Turn Off the Mac Alert
To approve only from the terminal on a Mac too, set POCKETTY_PROMPT=off for the daemon. See Environment.