Comment on page
Add SSH credentials
SSH credentials are currently used by Portainer in our Kubernetes provisioning feature. Credentials created here will be usable by any admin-level user, though they will not be able to view the actual credentials directly.
The exact method for configuring your SSH user will differ from platform to platform. For the Kubernetes provisioning feature, we assume the following for the user you create:
- The user has sudo privileges or is a root user - this is because Portainer needs this level of access in order to install Kubernetes.
- SSH is listening on port
22on the server.
We generally recommend the use of a SSH key for authentication rather than password authentication, but Portainer supports both methods.
You can also choose to upload your private key by clicking Upload SSH private key and selecting the file to upload. This will replace anything in the SSH private key field with the contents of the uploaded file.
When you are ready, click Add credentials to complete the process.
If you would like to create a new key pair for your SSH credentials, you can do so by clicking Generate new RSA SSH key pair. You will first be prompted to enter an optional passphrase for your private key, then click the Generate SSH key pair button to proceed.
Portainer will then generate a new key pair for you and display the resulting private and public keys. You can copy the values to your clipboard with the Copy buttons, or download the individual files with the Download buttons.
Ensure you take a copy of both the public and private keys, as you will not be able to retrieve them.
Your newly generated public key should be added to the
authorized_keysfile for the SSH user you intend to use on your nodes for provisioning.
Key pairs are generated with a key size of
Once you have saved the public and private key files, click Continue. You will be returned to the previous screen and the SSH private key passphrase and SSH private key fields will be populated with your new key pair's passphrase and private key respectively.