linux ssh免密码证书登录
![](https://gaojinbo.com/wp-content/uploads/2023/12/ssh-key-authentication-article-image-2000x1000-1-1024x512.png)
rsa证书可以同时登录ubuntu和centos等linux系统
主控端生成证书并发送公匙到被控端
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub>> ~/.ssh/authorized_keys
scp ~/.ssh/id_rsa.pub www.gaojinbo.com:~/.ssh/
被控端添加公匙
mkdir .ssh && cat ~/id_rsa.pub>> ~/.ssh/authorized_keys