Monday, December 3, 2012

entering passphrase on every ssh

There is a nice html document on this subject here. But basically all it says is if you don't wanna type in your private key everytime you make an ssh connection, you can use ssh-agent to enter it just once when you login to your shell.

Some people say that it should already add your private key into the memory so it can readily be applied, however on my system, I have to add it on every login like so:
ssh-add ~/.ssh/id_rsa



OKAY.

When I ssh to my virtual machine (machine A) from my local machine (machine B), and I need to run ssh-agent, on that ssh (B-A) connection, this is how I do it:

exec ssh-agent bash

Then I need to run ssh-add ~/.ssh/id_rsa, which will add my key for this ssh terminal, and then I will be able to use the key without typing in pass phrase on machine A, from machine B.

No comments:

Post a Comment