Илья Винокуров

Записки быдлокодера

Previous Entry Share Next Entry
Ключи от PuTTY
iv77rus
sudo apt-get install putty
puttygen ~/puttykey.ppk -L > ~/.ssh/id_rsa.pub
puttygen ~/puttykey.ppk -O private-openssh -o ~/.ssh/id_rsa
chmod 700 .ssh
chmod 600 .ssh/id_rsa*
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys


ssh-copy-id username@remote_host
    ssh username@remote_host sh -c "'( [ -d .ssh ] || mkdir .ssh ) \
    && chmod 700 .ssh \
    && cat .ssh/authorized_keys - | uniq > .ssh/authorized_keys.bak \
    && mv .ssh/authorized_keys.bak .ssh/authorized_keys \
    && chmod 600 .ssh/authorized_keys'" < ~/.ssh/id_rsa.pub


sudo vim /etc/ssh/sshd_config
    RSAAuthentication yes
    PubkeyAuthentication yes
    PasswordAuthentication no


sudo vim /etc/ssh/ssh_config
    ForwardAgent yes


ssh-agent
   echo 'eval $(ssh-agent)' >> ~/.bash_profile


ssh-add -d
ssh-add

ssh -i ~/.ssh/id_rsa username@remote_host

https://wiki.archlinux.org/index.php/SSH_Keys_%28%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%29

?

Log in