ssh-copy-id
๐
Using ssh-copy-id
feels good.
About Permissions ๐
Make sure the permissions of the two files on the server side are as below:
~/.ssh
: 700~/.ssh/authorized_keys
: 600
If not, chmod
them to be so.
Algorithm ๐
Make sure the algorithm is supported on the local side i.e. have the option PubkeyAcceptedKeyTypes +ssh-rsa
.
Git Servers ๐
If it’s about a git server, make sure the setting is related to the right host e.g.
Host github.com
Hostname github.com
User Yuan-Ru-Lin
IdentityFile ~/.ssh/github
where ~/.ssh/github
is the identity whose pubkey are added to your GitHub account.