29 дек. 2010 г.

ssh, аутентификация по ключам

cd ~.ssh;
# пусть id_rsa.pub - публичный ключ, alpha - наш сервер
cat id_rsa.pub | ssh alpha 'mkdir .ssh; cd .ssh; cat >> authorized_keys2; chmod 600 authorized_keys2'
cat id_rsa.pub | ssh alpha 'mkdir .ssh; cd .ssh; cat >> authorized_keys; chmod 600 authorized_keys'