4 Responses to “How to setup SSH without password”

  1. GrangerX says:

    Another thing to check if the login does not work is ownership of the .ssh directory and the authorized_keys or authorized_keys2 files. If they are created as root but placed into a non-root user’s folder , they may not behave as expected.

    Also, RedHat-based systems come with a utility called “ssh-copy-id” that can automatically copy a key to a remote server.

    The ssh-copy-id command uses the following syntax:
    ssh-copy-id [-i [identity_file]] [user@]machine

    It will ask for the user’s password before connecting, but after that one time, future logins should be allowed using the key sent to the remote machine.

  2. edevlet says:

    good thanks you. will

  3. Steveco says:

    The scp command copies myid_dsa.pub into the .ssh directory on the remote machine, but later commands seem to expect it to be in the home directory. I did

    $ cat ~/.ssh/myid_dsa.pub >> ~/.ssh/authorized_keys
    $ rm ~/.ssh/myid_dsa.pub

    and that worked.

    Thanks,
    Steve

  4. Mica says:

    An alternative to ssh keys is using expect to do automatic login.

    http://blog.hortopan.com/ssh-scm-simple-connection-manager.html

Leave a Reply