Associating SSH public key with hostcopy to clipboard the public key:cat name_dsa.pub | pbcopy
cd ~/.ssh
ssh-keygen -t rsa -C "email@gmail.com"
ssh-add github_rsa
pbcopy < github_rsa.pub
# -rw-r--r--
chmod 644 github_rsa.pub
# -rw-------
chmod 600 github_rsa
# re-add ssh key if passphrase is inaccesible
ssh-add ~/.ssh/github_rsa
# check authenticity to the host
git:(master) ssh -T -o "VerifyHostKeyDNS ask" git@github.com
Hi hamecoded! You've successfully authenticated, but GitHub does not provide shell access.
# ~/.ssh/config
Host heroku.com
User name
IdentityFile ~/.ssh/name_dsa
Host github.com
User name
IdentityFile ~/.ssh/github_rsa
Host bitbucket.org
User name
IdentityFile ~/.ssh/bitbucket_dsa
Host one
HostName site.co.il
User superman
Compression yes
0 - no access to the file whatsoever
1 - execute permissions only
2 - write permissions only
3 - write and execute permissions
4 - read permissions only
5 - read and execute permissions
6 - read and write permissions
7 - read, write and execute permissions (full permissions)
Owner / UserGroupOther/ Everyone