- xclip
$ mkdir ~/.ssh
$ cd ~/.ssh
$ ssh-keygen -t rsa -b 4096 -C <encryption key>
Appoints the filename of the key and press ENTER
two times.
Note: if no one name is informed to file, the tool will create with id_rsa
to private key, and id_rsa.pub
to public key.
$ eval $(ssh-agent -s)
$ ssh-add ~/.ssh/<filename>
Note: the $ ssh-add
command with out a file will try to add the private key contained in id_rsa
file by default.
$ xclip -sel clip < ~/.ssh/<filename>.pub
$ cat ~/.ssh/<filename>.pub | clip
$ ssh -T git@<git-repository-domain>
For security reasons, your should edit permissions in the folder ~/.ssh
.
$ chmod 700 -R ~/.ssh