[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] how to set up passwordless ssh access



Peter Scheie wrote:

I use 0600 (-r--r--r--) myself. I believe some distro's are stricter than others about these permissions. Or maybe it changed with some version of OpenSSH.

Probably a typo, but note that 0600  is not  -r--r--r--
As others mentioned, authorized_keys needs to be readable only by it's owner. So 0600 or (-rw-------) would be correct.

Ah yes, a typo indeed. 0600 is the correct setting, which would make it -r--------, which are the desired permissions.

Peter

Doh! Did it again. 0600 will make the permissions -rw-------, not -r--------. Anyway, 'chmod 0600' is the command to use. Time to go get some coffee.

I think rw by owner is OK with sshd, but the easy way is to use chmod with the symbolic mode so you don't have to compute the numeric value yourself.

u=user
g=group
o=other
a=all

r=read
w=write
x=execute (or enter for a directory)


chmod u=r filename
set read-only by user.

You can also add or remove specific permissions, keeping the other existing settings:
chmod a+r filename  - add read access for user, group and other
chmod og-w filename - remove write access for group and other

--
  Les Mikesell
   lesmikesell gmail com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]