Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Passwordless login using SSH

    How can I configure ssh to do the passwordless logins between the users in a Linux server? I am using RHEL4.6 version. I have created some users in this server and I would like to login from one user to the other users in the same server without a password prompt by using SSH. I was using rsh for this purpose before, but since it is against our security policy , I have to switch to SSH.

    I have done the ssh configuration by creating the keys and copying the public keys to the file .ssh/authorized_keys of the other users in the same server.
    But unfortunately still I am not able to login to other users in the same system WITHOUT a Password.

    I did the following settings.

    From user1:

    mkdir ~/.ssh
    chmod 755 ~/.ssh
    /usr/bin/ssh-keygen -t rsa
    /usr/bin/ssh-keygen -t dsa
    cat ~/.ssh/ >> ~/.ssh/authorized_keys
    cat ~/.ssh/ >> ~/.ssh/authorized_keys
    ssh user2@ds2 cat ~/.ssh/ >> ~/.ssh/authorized_keys
    ssh user2@ds2 cat ~/.ssh/ >> ~/.ssh/authorized_keys
    exec /usr/bin/ssh-agent $SHELL

    At user2 :
    chmod 644 ~/.ssh/authorized_keys
    exec /usr/bin/ssh-agent $SHELL

    But the strange thing is that I am able to connect to a user in a different server with out password. user1@ds2 to user1@ds3 . SSH is working properly here.

    Could anyone help me to resolve the issue with the connection between two users in a same server? Its really urgent for me.

  2. #2
    I think that if you do:

    userx@client$ ssh-keygen -t rsa
    Enter passphrase (empty for no passphrase):

    userx@client$ ssh-copy-id -i ..ssh/ userx@server

    So userx have no to enter passphrase.

    I hope this is what you want

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts