rsa key problem - Suse

This is a discussion on rsa key problem - Suse ; Hi, I generate an rsa key with: ssh-keygen -N '' -t rsa -f $HOME/.ssh/id_rsa and copy id_rsa.pub to my server. there i copy the two lines into ~/.ssh/known_hosts. i then restart sshd but i'm still not able to login without ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: rsa key problem

  1. rsa key problem

    Hi,

    I generate an rsa key with:
    ssh-keygen -N '' -t rsa -f $HOME/.ssh/id_rsa
    and copy id_rsa.pub to my server. there i copy the two lines into
    ~/.ssh/known_hosts. i then restart sshd but i'm still not able to login
    without a password promt, why not?
    --
    Thanks!
    Ron


  2. Re: rsa key problem

    On Mon, 2008-03-17 at 22:50 +0000, Ron Eggler wrote:
    > Hi,
    >
    > I generate an rsa key with:
    > ssh-keygen -N '' -t rsa -f $HOME/.ssh/id_rsa
    > and copy id_rsa.pub to my server. there i copy the two lines into
    > ~/.ssh/known_hosts. i then restart sshd but i'm still not able to login
    > without a password promt, why not?


    Could be several things... but the most common cause of not
    being able to use a key'd login is permissions on the directory
    path holding the key. Check your home dir permissions and .ssh
    dir permissions. Make sure they are locked down pretty tight.

    In general, I don't try to add things into known_hosts. But
    if you do, I would think it would be looking for the host key.
    Normally (default), the entry will get made the first time you
    go to a remote host.



  3. Re: rsa key problem

    Chris Cox wrote:

    > On Mon, 2008-03-17 at 22:50 +0000, Ron Eggler wrote:


    >> I generate an rsa key with:
    >> ssh-keygen -N '' -t rsa -f $HOME/.ssh/id_rsa
    >> and copy id_rsa.pub to my server. there i copy the two lines into
    >> ~/.ssh/known_hosts. i then restart sshd but i'm still not able to
    >> login without a password promt, why not?

    >
    > Could be several things... but the most common cause of not
    > being able to use a key'd login is permissions on the directory
    > path holding the key.


    > In general, I don't try to add things into known_hosts. But
    > if you do, I would think it would be looking for the host key.


    Make sure the header is correct, e.g.
    mymachine.example.com,XXX.XXX.XXX.XXX ssh-rsa QW3twuqXl4vp...

    Even an additional space character will mess up the keyless login,
    BTDTGNT.

    GŁnther


  4. Re: rsa key problem

    Ron Eggler schreef:
    > Hi,
    >
    > I generate an rsa key with:
    > ssh-keygen -N '' -t rsa -f $HOME/.ssh/id_rsa
    > and copy id_rsa.pub to my server. there i copy the two lines into
    > ~/.ssh/known_hosts. i then restart sshd but i'm still not able to login
    > without a password promt, why not?


    You should add your public key to the authorized_keys file not known_host.

    prompt> cat id_rsa.pub >> authorized_keys

+ Reply to Thread