One of my favorite things to do when managing Linux systems is to configure key-based authentication. This allows me to connect to multiple systems via scripts without have to re-authenticate every time. A decent walkthrough is available at http://linuxproblem.org/art_9.html
Scenario: You are user A on host A, and you want to log onto host B as user B
- As user A on host A, execute
- ssh-keygen -t rsa
- Echo out the contents of ~/.ssh/id_rsa.pub (save to clipboard or copy via ssh to host B)
- As user B on host b, make the .ssh directory if it doesnt already exist
- mkdir ~/.ssh
- Edit the file ~/.ssh/authorized_keys and enter the contents from id_rsa.pub
Your now done. Assuming all went well, user A on host A should be able to run ssh b@b and be automatically logged in
Comments
Post a Comment