ServerAuditor is a free iPad app that allows ssh to a server. I am trying to copy my public key to a server to allow password less login. On a pc this is easy- Generate the rsa key open terminal and

a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
b@B's password:

Enter the password and I'm good.

This app however has the following script where $1 is .ssh and $2 is authorized keys and $3 is the public key

if test ! -e $1;
then mkdir $1;
chmod 700 $1;
if test ! -e $1/$2;
then touch $1/$2;
chmod 600 $1/$2;
echo $3 >> $1/$2

I think I know what the bash script is doing but why does it change the permissions?

1 Answer 1


Because SSH credentials should never be group- or world-readable. The fact that the server(s) you administer are incorrectly configured and do not enforce this is not a good thing.

  • thank you. from what i have read other people chmod to 604. Feb 15, 2016 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .