Probably a permission problem (ssh)

Discussion in 'macOS' started by Eskadi, Jan 7, 2010.

  1. Eskadi macrumors newbie

    Joined:
    Jan 6, 2010
    #1
    Hi,

    Short Version
    Yesterday, while I was trying to fix a time machine backup problem when I screwed up. (this sums it up, doesn't it ?)

    More seriously, I executed chflags -R nouchg and chmod -RN on my / directory.
    Fortunately, I saw at some point (after 8 min.) that it was the wrong command. I canceled it.
    Repairing permissions did not find anything wrong (so no repairs done).

    My system is working fine, but now, I can no longer ssh my website. I investigated a potential permission problem on my .ssh folder and files without managing to fix this most unfortunate issue.

    Please, can anyone tell me what are the permissions of your .ssh file and folders, and of your ssh command ?

    To do this, please open the terminal and execute the following command:

    ls -le /Users/$(whoami)/.ssh

    and please, paste the result in this topic.

    Then, execute
    ls -le $(which ssh)

    and please, paste the result in this topic.

    Thank you very much for your help.


    Detailed version

    I did run the following commands:

    sudo su-
    chflags -R nouchg
    chmod -RN

    on the directory "/ /Users/me/......".

    Some of you may have noticed the extra "/" followed by a space. Which means that the command was first executed on / and then on the folder I requested.
     
  2. Mumford macrumors regular

    Joined:
    Oct 8, 2006
    Location:
    Altadena, CA
    #2
    You'll want the output of ls -ale ~/.ssh, not ls -le, since the ~/.ssh directory itself is important.

    Anyway:
    Code:
    myhostname:~$ ls -ale ~/.ssh
    total 192
    drwx------  12 myusername  staff    408 Jan  4 12:10 .
    drwxr-xr-x+ 66 myusername  staff   2244 Jan  7 09:34 ..
     0: group:everyone deny delete
    -rw-r--r--   1 myusername  staff   2040 Jul 24  2008 authorized_keys
    -rw-r--r--   1 myusername  staff   3666 Jul 24  2008 authorized_keys2
    -rw-r--r--   1 myusername  staff      0 Mar 24  2008 config
    -rw-------   1 myusername  staff    668 Apr 21  2003 id_dsa
    -rw-r--r--   1 myusername  staff    615 Apr 21  2003 id_dsa.pub
    -rw-------   1 myusername  staff    887 Apr 21  2003 id_rsa
    -rw-r--r--   1 myusername  staff    235 Apr 21  2003 id_rsa.pub
    -rw-------   1 myusername  staff    540 Apr 21  2003 identity
    -rw-r--r--   1 myusername  staff    344 Apr 21  2003 identity.pub
    -rw-r--r--   1 myusername  staff  64068 Jan  7 21:33 known_hosts
    myhostname:~$ ls -ale `which ssh`
    -rwxr-xr-x  1 root  wheel  1001520 Jul 11 00:02 /usr/bin/ssh
    Check to make sure ~/.ssh is 700. Anything but those perms will usually cause ssh to ignore the directory (ssh assumes it's not safe and proceeds without it). Also try using ssh -vvv to see if you can determine why it's failing.
     

Share This Page