ssh免密登录
[wj@master ~]$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
Generating public/private dsa key pair.
Your identification has been saved in /home/wj/.ssh/id_dsa.
Your public key has been saved in /home/wj/.ssh/id_dsa.pub.
The key fingerprint is:
SHA256:WmoyAQv+v7Wmol/uFIxTlcNxqTnMSGObG69HhDe5/Ps wj@master
The key's randomart image is:
+---[DSA 1024]----+
| .oo.. |
| +.+.. |
|. . o.O = |
|.. o+* @ |
| ..o.oB S |
| . .o.O |
| .oo*.. |
| .==.o.. |
| .o.o*=. .oE |
+----[SHA256]-----+
复制公钥
[wj@master ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
修改authorized_keys文件的权限
[wj@master ~]$ chmod 0600 ~/.ssh/authorized_keys