authorized_keys file

Help
Udi
2009-01-08
2012-07-18
  • Udi

    Udi - 2009-01-08

    Hi.

    I tried to hack this the whole day - but I can't get my Linux machine to log into the Windows server with the id_rsa key pairs. I put the file id_rsa.pub file on the server and called it authorized_keys. I then placed it in a directory called .ssh. From Linux, I try to log in with: ssh -i id_rsa user@172.20.20.58 ... I am still prompted for the password.

    To try and fix it - I changed some settings in the default etc/sshd_config file and restarted the server every time to get it to see the configuration changes. I tried setting RSAAuthentication to yes... I tried setting PubkeyAuthentication to yes... I played around with the path for AuthorizedKeysFile because I thought that maybe it doesn't find the file by relative paths...

    Nothing I did mattered, and I couldn't find any helpful error messages anywhere (I looked in the windows application log but but all the messages there were normal). Please Help!

    Thanks very much in advance,
    Udi.

     
    • Damonte

      Damonte - 2009-01-08

      You're not alone in wanting to do this. Hopefully, once the APT request is fully processed, I'll be able to get an updated release in your hands. Perhaps you'll have more success with that.

       
  • Mark

    Mark - 2009-11-25

    You need to convert the public key with the following command

    ssh-keygen -i -f id_dsa_2048_a.pub >> \

    .ssh/authorized_keys

    Server - generate Key / Public Key

    Copy public key to client.

    Convert key

    connect from server to client

     
  • Anonymous - 2009-12-13

    You need to convert the public key

    with the following command

    ssh-keygen -i -f iddsa2048a.pub >> \

    .ssh/authorizedkeys

    Server - generate Key / Public Key

    Copy public key to client. Convert key

    connect from server to client

    but the .ssh/authorized_keys is on the server and the public key is on the
    client. Or do you mean the public key should be scp'd to the server first,
    then run the ssh-keygen -i -f on it?

    I don't see any essential difference between what you are suggesting and...

    $ ssh-keygen -t dsa

    $ scp id_dsa.pub <user on="" server="">@<server>:/home/<user>/.ssh/

    I've spent a couple of days on this too.

    This is a question abouot OpenSSH on Windows.

    I'm trying to get key-pair auth running.

    password auth works fine.

    I've been through the ssh_config, sshd_config files and set everything

    up I can think of.

    I think I'm up against a permissions issue.

    Looks like one or all of the following directories/files have incorrect

    permissions. I'm not entirely sure what they are supposed to be.

    C:\Documents and Settings\<my user name>\

    C:\Documents and Settings\<my user name>.ssh

    C:\Documents and Settings\<my user name>.ssh\authorized_keys

    In the output of sshd when I run it in debug like this:

    C:\Program Files\OpenSSH\usr\sbin>sshd -d -d -d

    The most obvious error I get is:

    Authentication refused: bad ownership or modes for directory /home/<my

    user name>

    This is my sshd_config:

    http://paste.debian.net/53859/

    This is my ssh_config:

    http://paste.debian.net/53860/

    This is the output from C:\Program Files\OpenSSH\usr\sbin>sshd -d -d -d:

    C:\Program Files\OpenSSH\usr\sbin>sshd -d -d -d

    Any ideas?

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks