2011-10-12

How to Create A New SSH Key

Here is how you can change your OpenSSH .ssh key if you need to. On a non-shared Linux computer do the following:

$ ssh-keygen -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ssmoogen/.ssh/id_rsa): id_fedora_rsa
id_fedora_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in id_fedora_rsa.
Your public key has been saved in id_fedora_rsa.pub.
....

In your .ssh directory you can configure a file called config to use this key when logging into fedorapeople or similar stations:

Host *fedorahosted.org *fedorapeople.org pkgs.fedoraproject.org
    User ||put your fas account name here||
    ProxyCommand none
    ForwardAgent no
    ForwardX11 no
    Port 22
    KeepAlive yes
    HashKnownHosts no
    GSSAPIAuthentication no
    VerifyHostKeyDNS yes 
    IdentityFile ~/.ssh/id_fedora

1 comment:

Anonymous said...

Thanks a lot Smooge!