mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 03:25:35 +00:00
cmd/tailscale/cli: show rotation key when suggesting lock sign command
Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
parent
a6dff4fb74
commit
731be07777
@ -168,12 +168,17 @@ func runNetworkLockStatus(ctx context.Context, args []string) error {
|
|||||||
}
|
}
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
||||||
if st.Enabled && st.NodeKey != nil {
|
if st.Enabled && st.NodeKey != nil && !st.PublicKey.IsZero() {
|
||||||
if st.NodeKeySigned {
|
if st.NodeKeySigned {
|
||||||
fmt.Println("This node is accessible under tailnet-lock.")
|
fmt.Println("This node is accessible under tailnet-lock.")
|
||||||
} else {
|
} else {
|
||||||
|
p, err := st.PublicKey.MarshalText()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("This node is LOCKED OUT by tailnet-lock, and action is required to establish connectivity.")
|
fmt.Println("This node is LOCKED OUT by tailnet-lock, and action is required to establish connectivity.")
|
||||||
fmt.Printf("Run the following command on a node with a trusted key:\n\ttailscale lock sign %v\n", st.NodeKey)
|
fmt.Printf("Run the following command on a node with a trusted key:\n\ttailscale lock sign %v %s\n", st.NodeKey, p)
|
||||||
}
|
}
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user