Your SSH keypair authenticates you to Gentoo Infrastructure. Properly handling these keys is vital to keeping our machines safe. Please try to follow these guidelines:
First of all, be physically logged on to your own computer. Make sure that no-one will see you typing stuff in, since we are going to type in passphrases and such. So get your pepperspray and fight all untrusted entities until you are home alone.
Now we are going to create our ssh keys, RSA keys to be exact. The key should
be at least 2048 bits in length, but 4096 bits is recommended. Log onto
your computer as the user that you are going to be using when you want
to access cvs.gentoo.org. Then issue
$ ssh-keygen -t rsa -b 4096 Generating public/private rsa key pair. Enter file in which to save the key (/home/temp/.ssh/id_rsa):(Press enter) Created directory '/home/temp/.ssh'. Enter passphrase (empty for no passphrase):(Enter your passphrase) Enter same passphrase again:(Enter your passphrase again) Your identification has been saved in /home/temp/.ssh/id_rsa. Your public key has been saved in /home/temp/.ssh/id_rsa.pub. The key fingerprint is: 85:35:81:a0:87:56:78:a2:da:53:6c:63:32:d1:34:48 user@examplehostThis is the fingerprint of your new key
# ls ~/.ssh id_rsa id_rsa.pub
You may have more files than this, but the two files listed above are the ones that are really important.
The first file,
The second file,
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
You should place your public key into LDAP, using
$ perl_ldap -b user -C sshPublicKey "$(cat ~/.ssh/id_rsa.pub)" <username>
Every time you want to log on to a remote host using SSH public key
authentification, you will be asked to enter your passphrase. As much as
everybody likes typing, too much is sometimes too much. Luckily, there is
First, install
# emerge keychain
Now have keychain load up your private ssh key when you log on to your local
box. To do so, add the following to
keychain ~/.ssh/id_rsa . .keychain/hostname -sh
Be sure to substitute