Topics: AIX, Security, System Admin

Password-less SSH Login

On occasion I have the need to establish trust relationships between Unix boxes so that I can script file transfers. In short, here's how you leverage SSH to do that. Using the example of trying to connect from server "a" to get a file on "b" follow this example:

  • Connect to "a".
  • Type: ssh-keygen -t rsa
  • The default directory for keyfiles will be ~/.ssh/ (if you do not want to be prompted, leave passphrase blank).
  • Copy the contents of .ssh/ (there should only be one line).
  • Place this line on "b", in ~/.ssh/authorized_keys.
That's it, you should now be able to ssh/sftp/scp from a to b without being prompted for a password!

If you found this useful, here's more on the same topic(s) in our blog:

UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.

Interested in learning more?