Passwordless login is a great feature when you are performing regular administration between servers. I use it often, but rarely go through the process to set up. Therefore I usually forget what needs to be done and I end up scouring the web for instructions. So here is what I ended up with.
I have my local system, we'll call it Home and then I have a remote server, we'll call it Remote (nor very creative, I know). In this case both servers are running Ubuntu 10.04.
If you haven't done this before on Home you'll need to generate authentication keys (step 2). Otherwise skip this step.
I have my local system, we'll call it Home and then I have a remote server, we'll call it Remote (nor very creative, I know). In this case both servers are running Ubuntu 10.04.
If you haven't done this before on Home you'll need to generate authentication keys (step 2). Otherwise skip this step.
- Log into Home (local computer) as the user you want to user for passwordless ssh
- Type:
ssh-keygen -t rsa- Default directory for keyfiles will be ~/.ssh/ (your home directory)
- Leave passphrase blank!
- Copy the contents of .ssh/id_rsa.pub (there should only be one line) to your home directory .ssh folder on the Remote server. The file will be called ~/.ssh/authorized_keys
- Check first to make sure there is a .ssh folder in your home directory on Remote
- Type: scp id_rsa.pub remoteuser@Remote:.ssh/authorized_keys