account 1:
Mr. Putin
[email protected]
account 2:
Mr. Trump
[email protected]
... do not forget to specify the file name ...
> cd ~/%userprofile%/.ssh/
> ssh-keygen -t rsa -b 4096 -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (~/%userprofile%/.ssh/id_rsa): id_rsa_MrPutin # specify the file name
Enter passphrase (empty for no passphrase): # can skip
Enter same passphrase again: # can skip
Your identification has been saved in id_rsa_MrPutin.
Your public key has been saved in id_rsa_MrPutin.pub.
The key fingerprint is:
SHA256:nmdZJF5z1Gry/2Zfmrputin2jZX+2deQwXU33Q25aBI [email protected]
The key's randomart image is:
+---[RSA 4096]----+
| o=B|
| ...o+ooo.+.. |
| ..+.++o |
| ..++o=O. |
| S [email protected]|
| . . o o.*= |
| o + .oO|
| o oB |
| o*|
+----[SHA256]-----+
Two files created:
id_rsa_MrPutin
- private key (without extension)
and
id_rsa_MrPutin.pub
- public key
... do not forget to specify the file name ...
> cd ~/%userprofile%/.ssh/
> ssh-keygen -t rsa -b 4096 -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (~/%userprofile%/.ssh/id_rsa): id_rsa_MrTrump # specify the file name
Enter passphrase (empty for no passphrase): # can skip
Enter same passphrase again: # can skip
Your identification has been saved in id_rsa_MrTrump.
Your public key has been saved in id_rsa_MrTrump.pub.
The key fingerprint is:
SHA256:EssBed6AYMP/afjmrtrumpgvkvVFRwTjXHm/Q0bAA18 [email protected]
The key's randomart image is:
+---[RSA 4096]----+
| .+..ooo++..E |
| E o..X|
| . o=+ ..+ |
| ..o+o + |
| ++oS o .|
| . . =.o |
| o.. * . |
| +oo .o = |
|o oo +o+ ..+o |
+----[SHA256]-----+
Two files created:
id_rsa_MrTrump
- private key (without extension)
and
id_rsa_MrTrump.pub
- public key
Create a file ~/%userprofile%/.ssh/config
:
# Github for "Mr. Putin"
Host mrputin.github.com # 'github.com' change to 'mrputin.github.com'
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_MrPutin
# Github for "Mr. Trump"
Host mrtrump.github.com # 'github.com' change to 'mrtrump.github.com'
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_MrTrump
Connection for Mr. Putin
[email protected]:MrPutin/foreign_policy.git
change to:
[email protected]:MrPutin/foreign_policy.git
Connection for Mr. Trump
[email protected]:MrTrump/domestic_policy.git
change to:
[email protected]:MrTrump/domestic_policy.git