当前解决:恢复权限
7.ssh免密登录
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
ssh hyt-bigdata02
ssh-copy-id 10.214.22.46
ssh-copy-id 10.214.22.47
ssh-copy-id 10.214.22.48
ssh-copy-id 10.214.22.49
ssh-copy-id 10.214.22.50
ssh-copy-id hyt-bigdata01
ssh-copy-id hyt-bigdata02
ssh-copy-id hyt-bigdata03
ssh-copy-id hyt-bigdata04
ssh-copy-id hyt-bigdata05
Spcntest&0920
ssh-copy-id -i ~/.ssh/id_rsa.pub root@10.214.22.46
更改权限:
-rw------- 1 root root 1200 11月 6 17:23 authorized_keys
-rwxrwxrwx. 1 root root 1679 11月 6 17:21 id_rsa
-rwxrwxrwx. 1 root root 400 11月 6 17:21 id_rsa.pub
-rwxrwxrwx. 1 root root 1745 11月 6 17:24 known_hosts
01可用的权限:
-rw------- 1 root root 400 11月 6 23:53 authorized_keys 600
-rw------- 1 root root 1679 11月 6 23:42 id_rsa 600
-rw-r--r-- 1 root root 400 11月 6 23:42 id_rsa.pub 644
-rw-r--r-- 1 root root 376 11月 6 18:12 known_hosts 644
03可用的权限
-rw------- 1 root root 400 11月 6 23:43 authorized_keys
-rw------- 1 root root 1679 11月 6 18:09 id_rsa
-rw-r--r-- 1 root root 400 11月 6 18:09 id_rsa.pub
-rw-r--r-- 1 root root 376 11月 6 18:18 known_hosts
02操作:
chmod 600 /root/.ssh/authorized_keys
chmod 600 /root/.ssh/id_rsa
chmod 644 /root/.ssh/id_rsa.pub
chmod 644 /root/.ssh/known_hosts
-rw------- 1 root root 1200 11月 6 17:23 authorized_keys
-rw-------. 1 root root 1679 11月 6 17:21 id_rsa
-rw-r--r-- 1 root root 400 11月 6 17:21 id_rsa.pub
-rw-r--r--. 1 root root 1745 11月 6 17:24 known_hosts