Skip to content

Ssh public key configuration

zayac edited this page May 4, 2011 · 1 revision

h1. SSH public key configuration

h2. Client

  • For security reasons it's better to use SSH public key for authorization. All you need to do is to generate key:

    ssh-keygen -t rsa
    

    Use wizard for detailed configuration, but beware that your keys must be stored in ~/.ssh directory.

  • Now you have to send generated id_rsa.pub to server's administrator.

Server

  • If a client has gave you the public key, you have to register it. Login as github user.

    mkdir -p ~/.ssh
    chmod 700 ~/.ssh
    cat id_dsa.pub >> ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    

    IMPORTANT: These commands are useful if you haven't got gitosis setuped. Gitosis is an utility that makes this process easier.