1. 程式人生 > >解決 id_rsa 權限不夠

解決 id_rsa 權限不夠

ssh 權限

問題
root@pts/1 # ssh 192.168.0.2
The authenticity of host ‘192.168.0.2 (192.168.0.2)‘ can‘t be established.
RSA key fingerprint is bd:02:00:5c:e7:b5:55:6e:c1:a0:d1:fb:a9:b6:0e:e1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.0.2‘ (RSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for ‘/root/.ssh/id_rsa‘ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/id_rsa
[email protected]‘s password: 

解決方案

root@pts/1 # chmod 755 .ssh 
root@pts/1 # chmod 600 id_rsa id_rsa.pub
root@pts/1 # chmod 644 known_hosts

解決 id_rsa 權限不夠