hadoopmaster@dhruvhadoop1:~$ cat /home/hadoopmaster/.ssh/id_rsa.pub >> /home/hadoopmaster/.ssh/authorized_keys
hadoopmaster@dhruvhadoop1:~$ chmod 600 authorized_keys
chmod: cannot access ‘authorized_keys’: No such file or directory
答案1
您似乎正在尝试更改 的权限/home/hadoopmaster/.ssh/authorized_keys
。如果是这样,您需要使用正确的路径,而不仅仅是文件名。使用以下命令重试:
chmod 600 /home/hadoopmaster/.ssh/authorized_keys
或者
chmod 600 .ssh/authorized_keys
或者
chmod 600 ~/.ssh/authorized_keys