...
Code Block |
---|
title | ssh-keygen |
---|
collapse | true |
---|
| passphrase = ansible123Juniper1 ( same as: root/Juniper1, because is easier to remember)
/project # ssh-keygen
!!!!! default wullwill use: root
!!!!! and will put it in /root/.ssh/
/project # ssh-keygen -t rsa -f /root/project.ssh/id_rsa -P ansible123Juniper1 -C ansibleroot
Generating public/private rsa key pair.
Your identification has been saved in /root/project.ssh/id_rsa.
Your public key has been saved in /root/project.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:gjLEcnkqJ5bE6O/KBH5c1mGle6clTJNqDvQ+72CIy0w ansible5O9zJGCqTGXyjvintT4ZjzFD7P0pYz6bwWMRPFYtYeY root
The key's randomart image is:
+---[RSA 2048]----+
| . =o |
| |o. . o . =. . |
|oo= . * E. + + |
| | |o+.o..+ * .. =+oo |
| |++= .+.*S+ o B +S. |
|++oo+ *.. = . O..o. . |
| | o E+ . * . +.O=..+ |
|o * . +. *o*=+ . |
| | | o.= .o .o+o++=.o |
+----[SHA256]-----+ |
Code Block |
---|
title | id_rsa.pub on the vMX |
---|
collapse | true |
---|
| Key on the vMX ( once copied )
root@vMX1% ls /var/home/ansible/:
.ssh id_rsa.pub
root@vMX1% more /var/home/ansible/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/DLTV+Qzxxxxxxxxxxxxxx6egBTuBB+60d ansible
>>> notice the "ansibleroot" at the end of the public key <<<<<<< |
|
Code Block |
---|
title | show keys |
---|
collapse | true |
---|
| /project # ls /root/.ssh/
id_rsa id_rsa.pub known_hosts
/project #
/project # more /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABxxxxxxxxxxxxxxxxxxxxxxxxxxAbguhcbH AAAAB3NzaC1yc2EAAAxxxxxxxxxxxxxxxxxxxxxxxPhGutC3GzMrtI+oYiTroot
ansible
/project # more /root/.ssh/id_rsa
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,05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gqTs1YtHPP479cSmEjiw2GFKCzGUvfNEpONzvyE0r+d9psW
-----END RSA PRIVATE KEY-----
/project #
!!!!!!! if using defaut ( root account ) !!!!!!!
/project # ls /root/.ssh/
id_rsa id_rsa.pub known_hosts
/project # more /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAxxxxxxxxxxxxxxxxxxxx root@fd9589e5bc79
/project #
|
|
---|
RSA:
-Asymmetric Encryption: Private and Public key
-#Diffie-Hellman
-2,048 bits (or 617 decimal digits )
-Rivest-Shamir-Adleman
...