Public/Private Key SSH Authentication Failing

Discussion in 'Mac Apps and Mac App Store' started by Littleodie914, Nov 12, 2010.

  1. Littleodie914 macrumors 68000

    Littleodie914

    Joined:
    Jun 9, 2004
    Location:
    Rochester, NY
    #1
    I've got an old iBook G4 that I'm using as a file server. I've set up public/private key SSH authentication on the machine. Here are the steps I've followed:

    1. Create a non-admin user account on the iBook. ('craig')
    2. Log in on the iBook physically, and create a public/private key combination that is password protected. I was very careful to remember my password.
    3. Add the public key to authorized_keys2, which is the file specified in /etc/sshd_config
    4. I used a USB thumbdrive to transfer the private key to my Macbook. I tried to log in to the iBook using:
      Code:
      ssh 192.168.1.147 -i ~/Desktop/craig/id_dsa -v
    5. It prompts me for a password, but entering it properly does not grant access, the window just pops up again. Running in verbose mode, I see:
      Code:
      debug1: Authentications that can continue: gssapi,publickey,keyboard-interactive
      debug1: Next authentication method: publickey
      debug1: Offering public key: /Users/Craig/.ssh/id_dsa_craig
      debug1: Authentications that can continue: gssapi,publickey,keyboard-interactive
      debug1: Trying private key: /Users/Craig/Desktop/craig/id_dsa
      debug1: PEM_read_PrivateKey failed
      debug1: read PEM private key done: type <unknown>
      debug1: PEM_read_PrivateKey failed
      debug1: read PEM private key done: type <unknown>
      debug1: PEM_read_PrivateKey failed
      debug1: read PEM private key done: type <unknown>

    So I'm a little confused. First, it's trying to use a public key in my .ssh folder that I don't specify. Second, when it finally gets around to using the private key I suggested, authentication fails. :confused:

    I can post my sshd_config file if you think it will help, but I don't want to clog the tubes. :D
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I think you have the order wrong on the command. Try,

    Code:
    ssh -v -i ~/Desktop/craig/id_dsa 192.168.1.147
     

Share This Page