Text

Tuesday, May 02, 2006

ssh-keygen

Ever since discovering ssh-keygen, I've loved it to bits. Moving about machines became so much simpler. And ever since I've used ssh-keygen, I've had a blank "passphrase". For some reason I decided to enter a passphrase today. Guess what? You can login to the other machines by entering your passphrase. But it doesn't remember that event on subsequent use of the key! I thought it would be like sudo. So doing a repository update of my project directories meant that I had to enter my password for each project. Trouble... troublesome! I'm not going to work anymore! It's like having two passwords and you have to enter at least one of them. I don't get it, what's the point of having a passphrase then? What's the point of the ssh-keygen'erated then?

That's right... There's no point to it if you haven't yet heard of ssh-agent and ssh-add; which can be found at the bottom of ssh-keygen's man-page under the "SEE ALSO" section! These two utilities help manage your keys to avoid the problem I just described before. To use ssh-agent, first put your shell under the management of ssh-agent running the command: "ssh-agent bash" (this starts a new bash shell). Next tell ssh-agent about your key by running the command: "ssh-add". This defaults to $HOME/.ssh/id_something file. If you chose a different file name, just tell ssh-add where to find it. When adding the key, ssh-add will ask you for your... PASSPHRASE! After this you should be able to use the key without entering the PASSPHRASE for that shell session.

0 Comments:

Post a Comment

<< Home