Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15
Hi Mazer When I manually login using ssh -o "PubKeyAuthentication yes" userB@serverB, it will ask for password. I will look into the making your suggested change in the sshd_config file ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    mjc
    mjc is offline
    Just Joined!
    Join Date
    Jul 2007
    Posts
    21

    Hi Mazer

    When I manually login using ssh -o "PubKeyAuthentication yes" userB@serverB, it will ask for password. I will look into the making your suggested change in the sshd_config file and see what happens.

    Cheers

  2. #12
    Linux Newbie mazer's Avatar
    Join Date
    Jul 2006
    Location
    Tucson, Arizona, USA
    Posts
    109
    Quote Originally Posted by mjc View Post
    Hi Mazer

    When I manually login using ssh -o "PubKeyAuthentication yes" userB@serverB, it will ask for password. I will look into the making your suggested change in the sshd_config file and see what happens.

    Cheers
    But I guess the server (serverB) still thinks that you have
    Code:
    PasswordAuthentication yes.
    Just set this to "no" and restart the server.
    Mazer

  3. #13
    mjc
    mjc is offline
    Just Joined!
    Join Date
    Jul 2007
    Posts
    21
    Hi Mazer
    I wanted to circle back on this. Changing the option had no effect however after researching a bit more I was able to have it working.

    The problem was due to permissions; the .ssh directory and key files on the serverB were set to mode 700 and 600 respectively. We also included an authorized_keys2 file. Once that was added, it worked. I'm not sure why we needed that second file, we're using Openssh 3.9p1 on both servers.

    Thanks again

  4. $spacer_open
    $spacer_close
  5. #14
    Linux Newbie mazer's Avatar
    Join Date
    Jul 2006
    Location
    Tucson, Arizona, USA
    Posts
    109
    Quote Originally Posted by mjc View Post
    Hi Mazer
    I wanted to circle back on this. Changing the option had no effect however after researching a bit more I was able to have it working.

    The problem was due to permissions; the .ssh directory and key files on the serverB were set to mode 700 and 600 respectively. We also included an authorized_keys2 file. Once that was added, it worked. I'm not sure why we needed that second file, we're using Openssh 3.9p1 on both servers.

    Thanks again
    Thanks for your reply. I have never had a permission problem. I should check my settings.

    I think you need the "authorized_keys2" file for ssh2. Since I am also using this version of ssh and still store my keys in the authorized_keys file (without a 2) I thought that this should also work for you. Strange. You can however specify
    in the sshd_config file on your serverB
    Code:
    AuthorizedKeysFile .ssh/authorized_keys
    and then it should work with the old file.

    Cool that it is working now.
    Mazer
    I was seduced by SUSE 5.1.
    Registered Linux User #451562

  6. #15
    Just Joined!
    Join Date
    Mar 2010
    Location
    Pittsburgh
    Posts
    3

    permissions are picky (for some things)

    Sorry to revisit this after two-and-a-half years, but I had the same problem (and this was the second link in a web search, so others deserve to know).

    File permissions can be tricky, mine stopped working when I set the home directory to allow read to group ("sudo chmod 775 /home/username", as opposed to the default 755).

    Changing the home directory permissions back fixed my issue (i.e. now not prompting for password again).

    Not sure why ssh cares about allowing group (or anyone) to write to a home folder (or probably the .ssh inside it!), but it does. Looked in /etc/ssh/sshd_config, but not sure if there is a setting to ease up on this restriction and what implication that has (e.g. "strictmodes no"?). Also note, playing around with permissions of .ssh folder and authorized_keys2 files didn't affect the situation (i.e. I didn't *need* to have 700 and 600, respectively).

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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