ubuntu:~/environment $ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ubuntu/.ssh/id_rsa):
/home/ubuntu/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ubuntu/.ssh/id_rsa.
Your public key has been saved in /home/ubuntu/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:XuzZY0U8tBOevR6s8jNJJodmfBFqz0fYFRAc+P8v7ew ubuntu@ip-172-31-171-100
The key's randomart image is:
+---[RSA 2048]----+
| o+*..|
| . * =.|
| o % o|
| . o =.=.|
| S = + =+ |
| . o O Ooo.|
| . =.X.oo.|
| .o=..o|
| .o+E|
+----[SHA256]-----+
ubuntu:~/environment $ eval `ssh-agent`
Agent pid 23966ubuntu:~/environment $ ssh-add ~/.ssh/id_rsa
Identity added: /home/ubuntu/.ssh/id_rsa (/home/ubuntu/.ssh/id_rsa)
ubuntu:~/environment $ cat ~/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5VmlbYKxtMD9/pvItH/uqBOD3wf4S1bkQmsiezJzgsPG45tR2T6ZVCF71tXosGTETE6uX86ePYEPofk/H/HHq8yybsXxtqQmz7YX/qUOsd4c2y5eIVW6h8RJsUEgl9dgZk76vzookeSfVvheWmwytmwddBsodLtp3/xY1RSTygLtpRtY6kvTYC89Lq+6ariE6R5gFupX6w/oSe7idEMrxXCArpRpQL/APnLVD2gZX+X3QHKyM0MfytITMDl6p7DLN7htRegnCBxchPgIcbHVzhtqfIQUEgBWM5xUfC9HKGXXCwSvmdUflGGiVPdlqqJff9wk7jMjAZtaYdPigdy1B ubuntu@ip-172-31-171-100
ubuntu:~/environment $