Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sputnick-dev/65f023c2ac8c2318dcb2563199ec663a to your computer and use it in GitHub Desktop.
Save sputnick-dev/65f023c2ac8c2318dcb2563199ec663a to your computer and use it in GitHub Desktop.
[test@localhost ~]$ echo 'eval $(ssh-agent)' >> ~/.bash_profile
[test@localhost ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/test/.ssh/id_rsa):
Created directory '/home/test/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/test/.ssh/id_rsa.
Your public key has been saved in /home/test/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX test@localhost
The key's randomart image is:
+---[RSA 2048]----+
| . E . |
|. + o. |
|.* = . |
|+ X B . . |
|o* . S |
|==o . . |
|** o o |
|*+= . |
|X+.. |
+----[SHA256]-----+
[test@localhost ~]$ ssh remote-ssh-host 'cat >> /home/test/.ssh/id_rsa.pub'
# Now close your X session and come back
[test@localhost ~]$ ssh-add
Enter passphrase for /home/test/.ssh/id_rsa:
[test@localhost ~]$ ssh remote-ssh-host
[test@remote-ssh-host ~]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment