This is just another version of a host of other HowTo’s on this subject. It’s just this one is specific to me, so I’m really posting it for me. I posted the original version of this on the work wiki, so that might explain why it reads like it does. A bit. Maybe.
First create a DSA key on your primary development machine, in this case mars, 5 or more random words strung together, alphanumeric, you know the drill, (just to emphasise, this is a passphrase, not a password, it’s meant to be longer) :
ssh-keygen -t dsa
Then copy the generated public key to the machine you’re logging onto, in this case earth:
scp .ssh/id_dsa.pub USERNAME@earth:
SSH to earth:
ssh stephen@earth
On earth, add the public key to the list of authorized keys:
cat id_dsa.pub >> .ssh/authorized_keys
Exit earth, return to mars.
In your home dir on /mars/ edit ~/.bash_profile
# on this next line, we start keychain and point # it to the private keys that we'd like it to # cache /usr/bin/keychain --clear id_dsa . ~/.keychain/$HOSTNAME-sh
Exit mars and log in again. Now Keychain should start an ssh-agent session which, once you’ve typed in the passphrase, will cache your DSA keys meaning for the duration of this session you don’t have to enter a password/passphrase when connecting to earth. You can do the same thing for all of the machines you connect to as well, which is groovy, as someone might say.
«0 CommentsApril 25, MMVI»
You've arrived at the homepage of Stephen Stewart. The archive is available here for those who want it. This site is happily hosted by Dreamhost. Click for more?
More!? OK then, but I can't help feeling that this will be a disappointment to you.
I work as a web designer in Belfast, and I live by the sea in a shoe. You can see me here, doing my livejournal pose as idoru called it. If you need to you can email me at carisenda -at- gmail -dot- com.