How do I SSH into nodes?
To SSH into Kubernetes nodes on Syself Autopilot, connect as root on port 100 with the SSH key your cluster uses. Password login is off, and root is the only account.
kubectl get nodes -o wide
ssh -p 100 -i <path-to-key> -o IdentitiesOnly=yes root@<node-ip>
Which key works depends on the node:
- Hetzner Cloud nodes: the key named in
hcloud-ssh-key-namein thehetznerSecret, plus any keys listed in theSSHKeyNameHcloudvariable of the Cluster. - Bare-metal nodes: the Robot rescue key your cluster uses.
The keys are copied to a node when it is installed. A changed key reaches a node only when that node is installed again.
Keep SSH for emergencies, when a node does not answer the Kubernetes API. Root can read logs and run diagnostics, but cannot change the OS, because Syself Linux is immutable. Every command in an SSH session is written to the audit log of the node. While the node still answers the API, kubectl debug node/<name> needs no SSH key.
Port 100 is open to every source address by default. To limit it to a bastion host or close it, see Restrict SSH access. For everything else about SSH on the nodes, read Emergency SSH access.
Related questions
