1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 15:46:57 +01:00
Files
openshift-docs/modules/ssh-agent-using.adoc
2019-06-13 12:15:44 +00:00

67 lines
2.1 KiB
Plaintext

// Module included in the following assemblies:
//
// * installing/installing_aws/installing-aws-default.adoc
// * installing/installing_aws/installing-aws-customizations.adoc
// * installing/installing_aws/installing-aws-network-customizations.adoc
// * installing/installing_aws_user_infra/installing-aws-user-infra.adoc
// * installing/installing_bare_metal/installing-bare-metal.adoc
// * installing/installing_vsphere/installing-vsphere.adoc
[id="ssh-agent-using_{context}"]
= Generating an SSH private key and adding it to the agent
For production {product-title} clusters on which you want to perform installation
debugging or disaster recovery, you must provide an SSH key that your `ssh-agent`
process uses to the installer.
You can use this key to SSH into the master nodes as the user `core`. When you
deploy the cluster, the key is added to the `core` user's
`~/.ssh/authorized_keys` list.
[NOTE]
====
You must use a local key, not one that you configured with platform-specific
approaches such as
link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html[AWS key pairs].
====
.Procedure
. If you do not have an SSH key that is configured for password-less authentication
on your computer, create one.
For example, on a computer that uses a Linux operating system, run the
following command:
+
----
$ ssh-keygen -t rsa -b 4096 -N '' \
-f <path>/<file_name> <1>
----
<1> Specify the path and file name, such as `~/.ssh/id_rsa`, of the SSH key.
+
Running this command generates an SSH key that does not require a password in
the location that you specified.
. Start the `ssh-agent` process as a background task:
+
----
$ eval "$(ssh-agent -s)"
Agent pid 31874
----
. Add your SSH private key to the `ssh-agent`:
+
----
$ ssh-add <path>/<file_name> <1>
Identity added: /home/<you>/<path>/<file_name> (<computer_name>)
----
<1> Specify the path and file name for your SSH private key, such as `~/.ssh/id_rsa`
.Next steps
When you install {product-title}, provide the SSH public key to the installer.
If you install a cluster on infrastructure that you provision, you must provide
this key to your cluster's machines.