Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.26 KB

how_to_prepare_a_ssh_private_key.md

File metadata and controls

34 lines (22 loc) · 1.26 KB

How to prepare a SSH Private Key with empty password

You need a private key file.
This is used for OpenSSH inside the VMs. Please generate a password-less SSH-Key im PEM format.

If your are prompted to enter a password, simple hit enter key on our keyboard to use an empty password.

Example command to generate private key on Linux:

ssh-keygen -f ~/.ssh/playground_id_rsa -t rsa -m PEM -b 2048 -C "azure-plyg-demo"

Example command to generate private key on Windows:

cd %USERPROFILE%
mkdir .ssh
ssh-keygen -f .ssh/playground_id_rsa -t rsa -m PEM -b 2048 -C "azure-plyg-demo"

Make sure your private key does not exceed 2048 bytes (-b 2048).
I ran into error in terraform when using -b 4096.

Copy the private key to a Github Action secret named TF_VAR_ssh_private_key_pem

Open the private key in an editor (on Windows in Notepad), select an copy to clipboard.

ssh private key in notepad

In your forked Github repo create a new repository secret using Settings > Secrets > Actions > New repository secret named TF_VAR_ssh_private_key_pem and paste the contents of the private key file into the Value field.

ssh private key in gha