星期四, 3月 29, 2012

The Quick Way to Copy Public Key to Remote Machine's authorized_keys

Synopsis:
ssh-copy-id [-i [identity_file]] [user@]machine

ex: key-pair: richman and richman.pub
$ ssh-copy-id -i richman richman@remote_machine

NOTES:
If remote sshd has StrictModes set in its configuration, then the user's home, ~/.ssh, and ~/.ssh/authorized_keys need to have group writability disabled with
$ chmod go-w ~
$ chmod go-w ~/.ssh
$ chmod go-w ~/.ssh/authorized_keys

Reference:
man ssh-copy-id

沒有留言: