ssh-keygen: password-less SSH login script


This utility uses ssh-keygen and ssh_copy_id to create RSA private/public key pairs for use by SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2. The public key is then copied onto a remote system. You can now SSH to the remote system without the use of a password from the specified machine.

If the file /etc/root/.ssh/authorized_keys exists on the destination system, you probably already have it setup.

For more information see the man pages for ssh-keygen and ssh_copy_id.

Installation Instructions:

  1. Download trusted-key-exchange-1.3.tgz
  2. Open a Terminal window and type “su”
  3. Enter root’s password
  4. Extract the script from the tarball

    #tar –xzvf trusted-key-exchange-1.3.tgz
  5. Make the script executable.

    #chmod 755
  6. Create the shared keys between two Linux systems

    #./ -c
  7. Now ssh to the Linux system and it will not prompt you for the password.

Fixed in the 1.1 version:

  1. The script will now allow you to have trusted hosts setup between multiple systems. It now supports a one to many relationship.
  2. The prompts necessary during the script have been reduced.
Note: Using a –h will display other parameter options such as how to automatically delete the key that was just created.
(Visited 1 times, 1 visits today)


  • dvosburg says:

    Thanks for the helpful script!

  • Leave a Reply

    Your email address will not be published. Required fields are marked *