SSH - Private Key Passphrase not working for

Help
vwyoda
2013-03-18
2013-04-23
  • vwyoda
    vwyoda
    2013-03-18

    I am not sure if I am just not getting something here or if it is actually not working. When I have a SSH private key that also has a passphrase attached to it, Entering it in the field does not make PAC actually enter it when it is asked on the terminal.
    Here is the output on the terminal in PAC when it asks

    Enter passphrase for key '/key/location/here':
    

    Even trying to enter it when it pops up makes it fail to login properly. I know that I am putting in the correct phrase as I can SSH doing the same thing from my CLI.
    Can someone help shed some light here please thanks.

     
  • Hi!

    Are yuo using the "Private key" filelds "User" and "Passphrase" on that connection?
    - David.

     
  • vwyoda
    vwyoda
    2013-03-19

    Here is what I did
    I enter the private key location. Then enter the user. Then enter the passphrase. Click Save and Close. Then double click the connection.

    I also tried leaving passphrase empty and typing it in when it shows on the screen like the above output.

    Thanks

     
  • Could you please atcivate de "DEBUG" option  (Preferences -> TErminal options -> Advanced -> Expect DEBUG), and retry that connection?

    Then, could you please send me the whole output? (remember ro REMOVE PASSWORDS or any other confident information that may appear!)

    - David.

     
  • vwyoda
    vwyoda
    2013-03-20

    Hi David,

    Thanks for the help and great software, here is the requested info.

     CONNECTING WITH 'Server' =->
    [pac_conn(4905)][Server][Server]: !!_PAC_AUTH_[pac_PID681_n7]!!
    [pac_conn(4905)][Server][Server]: SPAWNING:ssh -p 22 -i "/home/user/.keys/mykey.pem"  -2 -4 -x -C -l USERNAMEHERE 1.2.3.4.5
    [pac_conn(4905)][Server][Server]: SPAWNED:'ssh -p 22 -i "/home/user/.keys/mykey.pem"  -2 -4 -x -C -l USERNAMEHERE 1.2.3.4.5' (PID:4905)
    Starting EXPECT pattern matching...
     at /usr/share/perl5/vendor_perl/Expect.pm line 561.
        Expect::expect('Expect=GLOB(0x23d8ee0)', 40, 'ARRAY(0x3577ee0)', 'ARRAY(0x3581058)', 'ARRAY(0x35812b0)', 'ARRAY(0x35813d0)', 'ARRAY(0x357cae8)', 'ARRAY(0x357cc98)', 'ARRAY(0x357cf20)', ...) called at /usr/share/pacmanager/lib/pac_conn line 1387
    spawn id(3): list of patterns:
      #2: -eof `'
      #3: -re `^.+ontinue connecting \\((.+)\\/(.+)\\)\\?\\s*$'
      #4: -re `.*(any key to continue|tecla para continuar).*'
      #5: -re `ffending .*key in (.+)\\:(\\d+)'
      #6: -re `([l|L]ogin|[u|U]suario|([u|U]ser-?)*[n|N]ame.*|[u|U]ser)\\s*:\\s*$'
      #7: -re `([p|P]ass|[p|P]ass[w|W]or[d|t]|[c|C]ontrase.a|Enter passphrase for key )\\s*:\\s*$'
      #8: -re `[#%\\$>]|\\:\\/\\s*$'
    spawn id(3): Does `'
    match:
      pattern #2: -eof `'? No.
      pattern #3: -re `^.+ontinue connecting \\((.+)\\/(.+)\\)\\?\\s*$'? No.
      pattern #4: -re `.*(any key to continue|tecla para continuar).*'? No.
      pattern #5: -re `ffending .*key in (.+)\\:(\\d+)'? No.
      pattern #6: -re `([l|L]ogin|[u|U]suario|([u|U]ser-?)*[n|N]ame.*|[u|U]ser)\\s*:\\s*$'? No.
      pattern #7: -re `([p|P]ass|[p|P]ass[w|W]or[d|t]|[c|C]ontrase.a|Enter passphrase for key )\\s*:\\s*$'? No.
      pattern #8: -re `[#%\\$>]|\\:\\/\\s*$'? No.
    Enter passphrase for key '/home/user/.keys/mykey.pem': 
    spawn id(3): Does `Enter passphrase for key \'/home/user/.keys/mykey.pem\': '
    match:
      pattern #2: -eof `'? No.
      pattern #3: -re `^.+ontinue connecting \\((.+)\\/(.+)\\)\\?\\s*$'? No.
      pattern #4: -re `.*(any key to continue|tecla para continuar).*'? No.
      pattern #5: -re `ffending .*key in (.+)\\:(\\d+)'? No.
      pattern #6: -re `([l|L]ogin|[u|U]suario|([u|U]ser-?)*[n|N]ame.*|[u|U]ser)\\s*:\\s*$'? No.
      pattern #7: -re `([p|P]ass|[p|P]ass[w|W]or[d|t]|[c|C]ontrase.a|Enter passphrase for key )\\s*:\\s*$'? No.
      pattern #8: -re `[#%\\$>]|\\:\\/\\s*$'? No.
    [pac_conn(4905)][Server][Server]: CLOSE:TIMEOUT:40 seconds trying to connect or get prompt!!
    [pac_conn(4905)][Server][Server]: DISCONNECTING
    [pac_conn(4905)][Server][Server]: DISCONNECTED
    
     
  • Hi!

    I think I found the problem.
    Please, goto "Preferences" -> "PAC Main options" -> "Advanced", and change the "PASSSWORD promtp" entry with this line:

    (ass|assor|ontrase.a|Enter passphrase for key '.+')\s*:\s*$

    Save and try again.
    If that didn't work, try using this other line:

    (ass|assor|ontrase.a|Enter passphrase for key .+)\s*:\s*$

    Please, let me know the results! :)

    - David.

     
  • vwyoda
    vwyoda
    2013-03-21

    Hi David,

    This string worked for me

    ([p|P]ass|[p|P]ass[w|W]or[d|t]|[c|C]ontrase.a|Enter passphrase for key '.+')\s*:\s*$
    

    Thanks for that :)