When you clone a remote repository using HTTPS, Git will prompt you for your username and password during the authentication process, on the other hand, when using SSH, Git uses your SSH key to authenticate, which means you don't need to send your credentials over the network.
Furthermore, SSH is a more secure method for cloning repositories, and working with the Git repos, as only the machines with the key file on disk can access these repositories. Even if the SSH key file was to be stolen, it wouldn't give access to the account itself (unlike the credentials) and can be easily revoked.
Creating an SSH Key
AzureAD+NurhakKaya@WAT607
MINGW64 /
$ cd .ssh/
AzureAD+NurhakKaya@WAT607 MINGW64 /.ssh
$ ls
id_rsa id_rsa.pub
AzureAD+NurhakKaya@WAT607 MINGW64 /.ssh
$ ssh-keygen -t rsa
-b 4096 -C "[email protected]"
Generating
public/private rsa key pair.
Enter file in which
to save the key (/c/Users/NurhakKaya/.ssh/id_rsa):
Enter passphrase
(empty for no passphrase):
Enter same
passphrase again:
Your identification
has been saved in /c/Users/NurhakKaya/.ssh/id_rsa
Your public key has
been saved in /c/Users/NurhakKaya/.ssh/id_rsa.pub
The key fingerprint
is:
SHA256:23Ur……………………………Ic1CdEJGL4ipg
[email protected]
The key's randomart
image is:
+---[RSA 4096]----+
|ooo+ |
|+ + . .
|
| ı o . . o
|
|. . o . o . .
|
|o+ . o S = X +
|
|E -. + . * O O o |
|o.4 + + + o = .|
| o . o +
o . |
| +....
|
+----[SHA256]-----+
AzureAD+NurhakKaya@WAT607 MINGW64 /.ssh
$
Comments
Post a Comment