Creating SSH key for OpenShift Container Platform machine access
Procedure
To create the key, run the following command.
ssh-keygen -N '' -f /root/.ssh/<key_name> -q <<< y > /dev/null
The <key_name>
is the name of the key. This name must be nonstandard
(something other than id_rsa
) to avoid existing key destruction and to prevent
OpenShift Container
Platform access from other SSH connections.
For example, issue the following command.
ssh-keygen -N '' -f /root/.ssh/ssh-azure.key -q <<< y > /dev/null
The output is similar to the following example.
[root@shahram-bastion1 ocp-tools]# ls -la /root/.ssh/
total 40
drwxr-xr-x. 2 root root 131 Jun 4 11:08 .
dr-xr-x---. 4 root root 179 Jun 4 11:03 ..
-rw-r--r--. 1 root root 9872 Jun 4 09:40 authorized_keys
-rw-r--r-- 1 root root 9872 Jun 4 09:40 authorized_keys2
-rw------- 1 root root 2622 Jun 4 09:40 id_rsa
-rw-r--r-- 1 root root 588 Jun 4 09:40 id_rsa.pub
-rw------- 1 root root 2622 Jun 4 11:08 ssh-azure.key
-rw-r--r-- 1 root root 588 Jun 4 11:08 ssh-azure.key.pub