Zobrazují se příspěvky se štítkempublic key. Zobrazit všechny příspěvky
Zobrazují se příspěvky se štítkempublic key. Zobrazit všechny příspěvky

pondělí 25. listopadu 2013

SSH: setup public key based authentification

generate public/private key pair:
ssh-keygen -t dsa

set correct permissions of the ~/.ssh directory
chmod 700 ~/.ssh && chmod 600 ~/.ssh/*

transfer your public key to a new server:
cat ~/.ssh/id_dsa.pub | ssh user@server \
        'mkdir -p .ssh && cat >>.ssh/authorized_keys && \
         chmod 700 .ssh && chmod 600 .ssh/*'

Ensure that permissions of the ~/.ssh directory are correct (as above).