Results 1 to 10 of 10

Thread: ssh client suddenly started to ask me for passphrase for all my servers (keys exists)

  1. #1
    Join Date
    Nov 2005
    Location
    London, UK
    Beans
    84
    Distro
    Ubuntu

    Question ssh client suddenly started to ask me for passphrase for all my servers (keys exists)

    All of the sudden whenever I ssh into any of my servers the ssh clients asks me for my rsa key passphrase (which does not exist), and when I press enter, it continues to ask for the remote server's account password. All of my public/private keys were working fine allowing me passwordless login to my servers until now.

    PHP Code:
    harel@mylaptop:~/.sshssh myserver
    Enter passphrase 
    for key '/home/harel/.ssh/id_rsa': <<< There is no passphrase, and key looks ok
    harel
    @spiderman's password: <<< why start now? 
    Any idea what can cause that?

    Thanks,

    Harel

  2. #2

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    in terminal:
    Code:
    ls -al /home/harel/.ssh/id_rsa
    is it 600 (-rw-------) ?
    Windows assumes the user is an idiot.
    Linux demands proof.

  3. #3
    Join Date
    Nov 2005
    Location
    London, UK
    Beans
    84
    Distro
    Ubuntu

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    Yes! but I'm not sure what it should be. Tried the following and up and this is what I get...

    Permissions 0640 for '/home/harel/.ssh/id_rsa' are too open.
    It is recommended that your private key files are NOT accessible by others.
    This private key will be ignored.

  4. #4

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    Terminal >
    Code:
    chmod 600 /home/harel/.ssh/id_rsa
    All ssh key files in ~/.ssh should be 600
    Windows assumes the user is an idiot.
    Linux demands proof.

  5. #5
    Join Date
    Nov 2005
    Location
    London, UK
    Beans
    84
    Distro
    Ubuntu

    Unhappy Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    But they are at 600... I also tried now to make all the files there 600 and still the same problem - keeps asking for passphrase followed by the password to any server that used to work yesterday without any passwords.

  6. #6
    Join Date
    May 2006
    Location
    Boston
    Beans
    1,918
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    Quote Originally Posted by yamagami View Post
    Yes! but I'm not sure what it should be. Tried the following and up and this is what I get...

    Permissions 0640 for '/home/harel/.ssh/id_rsa' are too open.
    It is recommended that your private key files are NOT accessible by others.
    This private key will be ignored.
    check your config file

    Code:
    less /etc/ssh/ssh_config
    from man ssh_config

    Code:
     BatchMode
        40               If set to “yes”, passphrase/password querying will be disabled.  In addition, the ServerAliveInterval
        41               option will be set to 300 seconds by default.  This option is useful in scripts and other batch jobs where
        42               no user is present to supply the password, and where it is desirable to detect a broken network swiftly.
        43               The argument must be “yes” or “no”.  The default is “no”.
    Last edited by fdrake; August 18th, 2011 at 11:37 PM.

    blog
    Donations BTC : 12FwoB7uAM5FnweykpR1AEEDVFaTLTYFkS
    DOUBLEPLUSGOOD!!

  7. #7
    Join Date
    Nov 2005
    Location
    London, UK
    Beans
    84
    Distro
    Ubuntu

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    Thanks fdrake, that worked. I don't know why this behaviour changed all of the sudden. Maybe one of the latest updates from canonical...

  8. #8
    Join Date
    Nov 2005
    Location
    London, UK
    Beans
    84
    Distro
    Ubuntu

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    It appears that with that setting set to yes, It won't let me ssh into servers that actually do require me to log in (to which I don't have a key..)
    This is very odd! I don't get how this behaviour just appears...

  9. #9
    Join Date
    May 2006
    Location
    Boston
    Beans
    1,918
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    Quote Originally Posted by yamagami View Post
    It appears that with that setting set to yes, It won't let me ssh into servers that actually do require me to log in (to which I don't have a key..)
    This is very odd! I don't get how this behaviour just appears...
    i don't know .... i never used this kind of option myself.

    ps. if your problem is solved mark it as "solved", as reference future users

    blog
    Donations BTC : 12FwoB7uAM5FnweykpR1AEEDVFaTLTYFkS
    DOUBLEPLUSGOOD!!

  10. #10
    Join Date
    Nov 2005
    Location
    London, UK
    Beans
    84
    Distro
    Ubuntu

    Re: ssh client suddenly started to ask me for passphrase for all my servers (keys exi

    Nope. not solved yet, nor do I know how it started.
    I'm afraid my only option is to try to regenerate my keys on all servers....

    EDIT: seems to be resolved.... I am really not sure how or what of the suggestions above did the trick but its ok... so closing this one.
    Last edited by yamagami; August 23rd, 2011 at 11:38 AM.

Tags for this Thread

Bookmarks

Posting Permissions

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