Loading ...
Sorry, an error occurred while loading the content.

Cant get OpenSSH to work on Unslung nslu2

Expand Messages
  • zedug98
    Hello all; first post; first experience with Linux (yes I sadly have had to use Windows for years at the office...). All excited still :) Anyway I just unslung
    Message 1 of 5 , Dec 4, 2007
    • 0 Attachment
      Hello all;

      first post; first experience with Linux (yes I sadly have had to use
      Windows for years at the office...). All excited still :)

      Anyway I just unslung my brand new nslu2 and the first package I'm
      setting up is OpenSSH and I'm running into a bit of trouble here.

      I religiously followed the instructions on
      http://www.nslu2-linux.org/wiki/HowTo/UseOpenSSHForRemoteAccess (even
      retried three times just to be sure).

      * I can telnet into the slug,
      * check that ssh is running - ps -ef output has the line
      512 root 3252 S /opt/sbin/sshd
      * I download PuTTY, generated the key pair on my winXP machine, set
      the public key in authorized_keys, checked permissions for root, .ssh
      and Authorized_keys 10 times
      * When starting Putty, as soon as I enter my login (root) I get a
      popup window saying "Disconnected: No supported authentication methods
      available", and the PuTTY telnet session says "Server refused our key"
      * I enabled loggin in PuTTY but all I get is the same message (server
      refused our key).
      * I ran grep sshd /var/log/messages but all I get is
      <38>Dec 4 22:37:49 sshd[512]: Server listening on 0.0.0.0 port 22

      ...I'm stumped there. Any help to keep me going will be massively
      appreciated !

      Thanks in advance;
      -z
    • Mike (mwester)
      Step 1 is to get OpenSSH working *without* any of the stuff listed in that wiki article. So, telnet in, and uninstall openssh, then restart the device (just to
      Message 2 of 5 , Dec 5, 2007
      • 0 Attachment
        Step 1 is to get OpenSSH working *without* any of the stuff listed in that
        wiki article.

        So, telnet in, and uninstall openssh, then restart the device (just to be
        sure), and re-install openssh.
        Now on Windows, point PuTTY to the slug, and you should be rewarded with a
        login prompt.
        Login as root, with the password you set, and it should be working.

        Once that's working, then you can begin to go forward with the far more
        complex task of installing keys and all that -- assuming, of course, that
        you need the additional security or the additional convenience of keys and a
        password-less login?

        Mike (mwester)

        ----- Original Message -----
        From: "zedug98" <zedug@...>
        To: <nslu2-linux@yahoogroups.com>
        Sent: Wednesday, December 05, 2007 1:12 AM
        Subject: [nslu2-linux] Cant get OpenSSH to work on Unslung nslu2


        > Hello all;
        >
        > first post; first experience with Linux (yes I sadly have had to use
        > Windows for years at the office...). All excited still :)
        >
        > Anyway I just unslung my brand new nslu2 and the first package I'm
        > setting up is OpenSSH and I'm running into a bit of trouble here.
        >
        > I religiously followed the instructions on
        > http://www.nslu2-linux.org/wiki/HowTo/UseOpenSSHForRemoteAccess (even
        > retried three times just to be sure).
        >
        > * I can telnet into the slug,
        > * check that ssh is running - ps -ef output has the line
        > 512 root 3252 S /opt/sbin/sshd
        > * I download PuTTY, generated the key pair on my winXP machine, set
        > the public key in authorized_keys, checked permissions for root, .ssh
        > and Authorized_keys 10 times
        > * When starting Putty, as soon as I enter my login (root) I get a
        > popup window saying "Disconnected: No supported authentication methods
        > available", and the PuTTY telnet session says "Server refused our key"
        > * I enabled loggin in PuTTY but all I get is the same message (server
        > refused our key).
        > * I ran grep sshd /var/log/messages but all I get is
        > <38>Dec 4 22:37:49 sshd[512]: Server listening on 0.0.0.0 port 22
        >
        > ...I'm stumped there. Any help to keep me going will be massively
        > appreciated !
        >
        > Thanks in advance;
        > -z
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Rod Whitby
        ... Did you check the permissions of the directories *above* root. That s the most common causes for this problem on Unslung. If anyone other than root can
        Message 3 of 5 , Dec 5, 2007
        • 0 Attachment
          zedug98 wrote:
          > * I download PuTTY, generated the key pair on my winXP machine, set
          > the public key in authorized_keys, checked permissions for root, .ssh
          > and Authorized_keys 10 times

          Did you check the permissions of the directories *above* root. That's
          the most common causes for this problem on Unslung. If anyone other
          than root can write to any directory or file in the complete path from /
          through all the intermediate directories down to the authorised_keys
          file, then it will not allow the connection.

          -- Rod
        • zedug98
          Thanks Mike. So I uninstalled ssh, reinstalled it and yes I can log directly with the root password. Yay. Now to move forward with this key thing ! -z
          Message 4 of 5 , Dec 5, 2007
          • 0 Attachment
            Thanks Mike.

            So I uninstalled ssh, reinstalled it and yes I can log directly with
            the root password. Yay.

            Now to move forward with this key thing !

            -z
          • zedug98
            Per Mike s advice I removed the package; reinstalled it, checked that it worked without setting a key pair. I then did the wiki instructions again and now it
            Message 5 of 5 , Dec 5, 2007
            • 0 Attachment
              Per Mike's advice I removed the package; reinstalled it, checked that
              it worked without setting a key pair.

              I then did the wiki instructions again and now it works !

              I'm not sure it changed anything permission-wise...

              Anyway thanks for your quick support !

              -z
            Your message has been successfully submitted and would be delivered to recipients shortly.