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

    putty failed with "Server unexpectedly closed network connection" when using rsa


    I need to connect from win to linux. Linux version is Fedora 7 and it runs on VirtualBox.

    Now, if I connect with putty as usual, everything just works. But if I connect with public/private key pair, the connection crashes.

    This is what putty says:
    2009-04-02 04:16:57	Looking up host ""
    2009-04-02 04:16:57	Connecting to port 22
    2009-04-02 04:16:57	Server version: SSH-1.99-OpenSSH_4.5
    2009-04-02 04:16:57	We claim version: SSH-2.0-PuTTY_Release_0.60
    2009-04-02 04:16:57	Using SSH protocol version 2
    2009-04-02 04:16:57	Doing Diffie-Hellman group exchange
    2009-04-02 04:16:57	Doing Diffie-Hellman key exchange with hash SHA-256
    2009-04-02 04:16:58	Host key fingerprint is:
    2009-04-02 04:16:58	ssh-rsa 2048 27:94:e8:72:40:c0:5c:fc:7e:ed:72:a4:e1:7d:6b:21
    2009-04-02 04:16:58	Initialised AES-256 SDCTR client->server encryption
    2009-04-02 04:16:58	Initialised HMAC-SHA1 client->server MAC algorithm
    2009-04-02 04:16:58	Initialised AES-256 SDCTR server->client encryption
    2009-04-02 04:16:58	Initialised HMAC-SHA1 server->client MAC algorithm
    2009-04-02 04:16:58	Reading private key file "E:\Putty\keys\key_priv.ppk"
    2009-04-02 04:16:59	Offered public key
    2009-04-02 04:16:59	Server unexpectedly closed network connection
    What is strange here is that it says
    ssh-rsa 2048 27:94:e8:72:40:c0:5c:fc:7e:ed:72:a4:e1:7d:6b:21
    But I just generated a 1024 key!??!

    There are various tutorials explaining how to do it, but as simple as it sounds, it just dosnt work.

    This is what I did:

    1. Generate RSA-Key
    2. copy public key to ~/.ssh/authorized_keys
    2.1 also tried authorized_keys2
    3. Set private key file in putty

    4. Connect

    5. typed user name,

    6. Error Message occured. So it doesnt promts me for key passphrase!

    7. Looked for ./var/log/auth.log, but wasnt there

    What could I do?
    I just spend hours again trying to solve this problem!!

    Up to now, I have no more information.


  2. #2

    Solved the problem partially.

    I used ssh2 but the connection assumed ssh1.
    So I generated an ssh1 key pair, set ssh1 in putty configuration, and bam, it
    seems to work.

    Now it promts me for passphrase and use pwd.

    Back to the problem:
    /etc/ssh/sshd_config says
    instead of
    which should be the one for ssh2.

    So the next question arises, how do I activate ssh2?


  3. #3
    More News.

    Now this is out of my abilities.

    I also have a fedora 9 on Suns VirtualBox.
    Now I tried to connect there with ssh2 and rsa ssh2 and so on, and it just works without trouble. Also puttys pageant just worked right away.

    On Fedora 7 ssh1 worked, but pageant doeant!

    Now I could just use Fedora 9 or somebody may give me some hints what i have to tweek.

    I looked in both, fedora 9's and 7's /etc/ssh/sshd_config file, but they just look the same.


    Many site state that the public key should be put in authorized_keys2 but on Fedora 9 it just works with the authorized_keys file. Which is also the file mentioned in sshd_config

  4. $spacer_open

Posting Permissions

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