mirror of
https://github.com/juanfont/headscale.git
synced 2025-07-18 13:12:50 -04:00
The preauthkeys commands expect a user id instead of a username
(cherry picked from commit a98d9bd05f9b5f02bd642d5853c75d87d708fb4a)
This commit is contained in:
parent
4d89030701
commit
00a5cce7fd
@ -112,11 +112,11 @@ docker exec -it headscale \
|
|||||||
|
|
||||||
### Register a machine using a pre authenticated key
|
### Register a machine using a pre authenticated key
|
||||||
|
|
||||||
Generate a key using the command line:
|
Generate a key using the command line for the user with ID 1:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker exec -it headscale \
|
docker exec -it headscale \
|
||||||
headscale preauthkeys create --user myfirstuser --reusable --expiration 24h
|
headscale preauthkeys create --user 1 --reusable --expiration 24h
|
||||||
```
|
```
|
||||||
|
|
||||||
This will return a pre-authenticated key that can be used to connect a node to headscale with the `tailscale up` command:
|
This will return a pre-authenticated key that can be used to connect a node to headscale with the `tailscale up` command:
|
||||||
|
@ -117,14 +117,14 @@ headscale instance. By default, the key is valid for one hour and can only be us
|
|||||||
=== "Native"
|
=== "Native"
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
headscale preauthkeys create --user <USER>
|
headscale preauthkeys create --user <USER_ID>
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Container"
|
=== "Container"
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker exec -it headscale \
|
docker exec -it headscale \
|
||||||
headscale preauthkeys create --user <USER>
|
headscale preauthkeys create --user <USER_ID>
|
||||||
```
|
```
|
||||||
|
|
||||||
The command returns the preauthkey on success which is used to connect a node to the headscale instance via the
|
The command returns the preauthkey on success which is used to connect a node to the headscale instance via the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user