Setting up SSH, SSH-Agent on mac OSX
01 Jun 2006 {View Comments}
I was following Stephen Stewart’s tutorial, about pretty much the same thing, and there were a couple of mac specific items that turned up which I wanted to note down.
-
Generate a new DSA key on your main development machine
-
Make sure you generate it with a passphrase (enter it on the first prompt)
-
Choose a nice long passphrase
-
Choose a name (or not if this is your first run, id_dsa is the default but you will want to do this if your generating another key)
cd ~ssh-keygen -t dsa
-
-
Copy the key to the server you wish to access * The colon and period at the end are important
`scp.ssh/id_dsa.pub USERNAME@DOMAIN:.` -
Login with secure shell to the server
`sshUSERNAME@DOMAIN` -
Add the public key to the list of authorized keys..
`cat id_dsa.pub >> .ssh/authorized_keys` `mv id_dsa.pub .ssh` `exit` -
Download and install SSHKeychain, It’s a nice utility that handles the SSH-Agent part of things (which i’ll pretend to know something about)
-
Launch SSHKeychain, and in the menu bar icon select Agent > Add all keys then choose the keys from the
.sshdir (it should go there automatically) You should be prompted to enter your passphrase, and off we go! -
You then have the option of adding the passphrase to your system keychain, which is good as it’ll save us remembering it along with all our other passwords
- If you’re doing this, remember to have a nice long password for your login keychain…. otherwise, really what was the point of all this :)
- Make sure it’s different from your account, and default system passwords too.
- If your also using filevault, then it’s pretty certain your data is going to be secure.