- xclip
$ mkdir ~/.ssh
$ cd ~/.ssh
$ ssh-keygen -t rsa -b 2048 -C <email to login on git repository web page>
Appoints the file of the key and press ENTER
two times.
For security, your should edit permissions in the folder ~/.ssh
$ chmod 700 -R ~/.ssh
$ eval $(ssh-agent -s)
$ ssh-add ~/.ssh/<filename>
Obs.: 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/<file_name>.pub | clip
$ ssh -T git@<git-server-domain>
Create in the remote repository the authorized_keys
file on ~/.ssh
and paste the public key.
$ touch ~/.ssh/authorized_keys
$ echo "<public key>" >> ~/.ssh/authorized_keys