Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 8
    Yup. ssh-copy-id should have taken care of the permissions of ~/.ssh and ~/.ssh/authorized_keys, but also make sure that your home directory itself isn't group-writable. Commented Dec 2, 2010 at 19:59
  • 11
    This was it, for me. I used ssh-copy-id to send over an RSA key, and I was still getting prompted. Running chmod g-w homedir on the remote server worked like a charm. Commented Sep 28, 2011 at 14:19
  • 1
    The logic to the above (which helps explain WHY you do it, which then helps me remember to do it) is this: the g+w permission on a directory lets you create, move, or rename its contents. Thus if your .ssh dir is set to g-w, but $HOME is set to g+w... then someone in that group could rename your .ssh dir to .junk (because g+w on $HOME allows that), and create a new (and "fraudulent") .ssh directory. Commented Apr 15, 2020 at 0:01