Unable to use key file (PuTTY SSH-2 private key) - SSH

This is a discussion on Unable to use key file (PuTTY SSH-2 private key) - SSH ; Hello, I have PuttyGen 0.60, Putty 0.60 on XP and OpenSSH_3.8.1p1 OpenSSL 0.9.7m 23 Feb 2007 on Linux pa936c1n5 2.4.21-32.0.1.EL.msdwhugemem #1 SMP Mon Dec 5 21:32:44 EST 2005 i686 I have tried generating rsa/dsa keys on Unix (on host called ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Unable to use key file (PuTTY SSH-2 private key)

  1. Unable to use key file (PuTTY SSH-2 private key)

    Hello,

    I have PuttyGen 0.60, Putty 0.60 on XP and
    OpenSSH_3.8.1p1 OpenSSL 0.9.7m 23 Feb 2007 on Linux pa936c1n5
    2.4.21-32.0.1.EL.msdwhugemem #1 SMP Mon Dec 5 21:32:44 EST 2005 i686

    I have tried generating rsa/dsa keys on Unix (on host called papa) and
    then importing private key onto XP and saving it in PPK format and
    saving the public key in ~/.ssh/authorized_keys.

    I have also tried generating rsa/dsa keys using PuttyGen and then
    saving OpenSSH public key onto ~/.ssh/authorized_keys.

    As I try to access using putty XP using any ssh 1 or 2 version I get
    following output error:

    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2008.06.05 15:26:44
    =~=~=~=~=~=~=~=~=~=~=~=
    Sent username "mitenm"
    Unable to use key file "C:\downloads\id_rsa.ppk" (PuTTY SSH-2 private
    key)
    mitenm@papa's password:

    From the generated rsa keys I placed the public key .ssh/id_rsa.pub on
    another unix machine (mama as .ssh/authorized_keys) with private key
    as .ssh/id_rsa (on papa) and then papa to mama ssh works fine without
    password requirement.

    Its the putty xp to unix that unable to talk well. Please note that
    papa is using AFS.

    Thanks.

    Miten.

  2. Re: Unable to use key file (PuTTY SSH-2 private key)

    wrote:
    > Sent username "mitenm"
    > Unable to use key file "C:\downloads\id_rsa.ppk" (PuTTY SSH-2 private
    > key)


    That's because PuTTY is using SSH-1 to talk to the server, and SSH-1
    and SSH-2 keys are not interchangeable. If you run PuTTYgen again
    but this time tell it to generate an SSH-1 key, it all ought to work
    better.

    (But if you can possibly arrange for the server to be upgraded so
    that it supports SSH-2, that would be a better solution.)
    --
    Simon Tatham "_shin_, n. An ingenious device for
    finding tables and chairs in the dark."

  3. Re: Unable to use key file (PuTTY SSH-2 private key)

    On Jun 5, 3:17 pm, Simon Tatham wrote:
    > wrote:
    > > Sent username "mitenm"
    > > Unable to use key file "C:\downloads\id_rsa.ppk" (PuTTY SSH-2 private
    > > key)

    >
    > That's because PuTTY is using SSH-1 to talk to the server, and SSH-1
    > and SSH-2 keys are not interchangeable. If you run PuTTYgen again
    > but this time tell it to generate an SSH-1 key, it all ought to work
    > better.
    >
    > (But if you can possibly arrange for the server to be upgraded so
    > that it supports SSH-2, that would be a better solution.)
    > --
    > Simon Tatham "_shin_, n. An ingenious device for
    > finding tables and chairs in the dark."


    I now ran PuttGen and selected radio button SSH-1 (RSA) . Then I
    generated keys. I copied text box public key content to .ssh/
    authorized_keys. I pointed the AUTH box use new private key. I still
    have following error.

    Sent username "mitenm"
    Trying public key authentication.
    No passphrase required.
    Server refused our public key.
    mitenm@msimldevny2's password:

  4. Re: Unable to use key file (PuTTY SSH-2 private key)

    wrote:
    > I now ran PuttGen and selected radio button SSH-1 (RSA) . Then I
    > generated keys. I copied text box public key content to .ssh/
    > authorized_keys. I pointed the AUTH box use new private key. I still
    > have following error.

    [...]
    > Server refused our public key.


    Well, that's a step forward: at least PuTTY is now at least _trying_
    to offer the key to the server, and the server is refusing it at the
    next stage.

    This error usually means that you haven't set up the configuration
    on the server correctly. Have you checked:

    - that .ssh/authorized_keys is not group-writable, or otherwise
    writable by any user on the system other than yourself?
    - that the .ssh directory and your home directory are likewise
    writable only by you?
    - that when you pasted the public key into .ssh/authorized_keys you
    did not add any line breaks by mistake?

    --
    Simon Tatham "I thought I'd put my foot so far into my mouth I
    wouldn't be able to sit down without standing up."

  5. Re: Unable to use key file (PuTTY SSH-2 private key)

    On Jun 5, 6:19 pm, Simon Tatham wrote:
    > wrote:
    > > I now ran PuttGen and selected radio button SSH-1 (RSA) . Then I
    > > generated keys. I copied text box public key content to .ssh/
    > > authorized_keys. I pointed the AUTH box use new private key. I still
    > > have following error.

    > [...]
    > > Server refused our public key.

    >
    > Well, that's a step forward: at least PuTTY is now at least _trying_
    > to offer the key to the server, and the server is refusing it at the
    > next stage.
    >
    > This error usually means that you haven't set up the configuration
    > on the server correctly. Have you checked:
    >
    > - that .ssh/authorized_keys is not group-writable, or otherwise
    > writable by any user on the system other than yourself?
    > - that the .ssh directory and your home directory are likewise
    > writable only by you?
    > - that when you pasted the public key into .ssh/authorized_keys you
    > did not add any line breaks by mistake?
    >
    > --
    > Simon Tatham "I thought I'd put my foot so far into my mouth I
    > wouldn't be able to sit down without standing up."


    I locked down my home dir and .ssh and its contents.

    Here are both AFS acl rights and unix rights for .ssh dir and its home
    dir.

    pa936c1n5>fs la .
    Access list for . is
    Normal rights:
    system:anyuser rl
    vmsadmin rlidwka
    mitenm rlidwka
    /ms/user/m/mitenm/.ssh
    pa936c1n5>ls -l
    total 467
    -rw------- 1 mitenm cc5254 818 Jun 5 08:38
    authorized_keys
    -rw------- 1 mitenm cc5254 616 Jun 5 04:43
    id_dsa_public.txt
    -rw------- 1 mitenm cc5254 887 Jun 5 04:53 id_rsa
    -rw------- 1 mitenm cc5254 226 Jun 5 04:53 id_rsa.pub
    -rw------- 1 mitenm cc5254 883 Jun 5 01:49 key
    -rw------- 1 mitenm cc5254 17161 Jun 5 04:47 known_hosts
    -rw------- 1 mitenm cc5254 454656 Jun 5 04:57 putty.exe
    -rw------- 1 mitenm cc5254 512 Jun 5 04:46 random_seed
    /ms/user/m/mitenm/.ssh

    /ms/user/m/mitenm
    pa936c1n5>fs la .
    Access list for . is
    Normal rights:
    system:anyuser rl
    vmsadmin rlidwka
    mitenm rlidwka
    /ms/user/m/mitenm

    Also authorized_keys in vi will jump line for who key while going down
    so it does not have any line breaks added while copying.

    Here is error now:
    Sent username "mitenm"
    Trying public key authentication.
    No passphrase required.
    Server refused our public key.
    mitenm@msimldevny2's password:

+ Reply to Thread