Use SSH key to access Debian from Mac OS X

2009.12.07

1. Open the OS X Terminal application

2. cd .ssh
If directory .ssh does not exist then mkdir .ssh

3. Generate SSH keys
ssh-keygen
Enter file in which to save the key (/User/xxxxx/.ssh/id_rsa): recommend leaving blank
Enter passphrase (empty for no passphrase): recommend entering passphrase
Enter same passphrase again:
Your identification has been saved in /Users/xxxxx/.ssh/id_rsa.
Your public key has been saved in /Users/xxxxx/.ssh/id_rsa.pub.

5. Access the .ssh directory on the server
cd /home/xxxxx/.ssh/
If directory .ssh does not exist then mkdir .ssh
chmod 700 /home/xxxxx/.ssh

4. Upload your public key to the server
Upload your id_rsa.pub to /home/xxxxx/.ssh/

5. Create the authorized_keys file
cat id_rsa.pub >> authorized_keys

Categories : Debian  OS X  OS X  Snow Leopard
Tags :