linux系统配置免密码的方式:
1:ssh-keygen -t rsa
生成密钥
2:ssh-copy-id -i ~/.ssh/id_rsa.pub jifeng@jifeng02
把本机的公钥追到jifeng02的 .ssh/authorized_keys 里
3:测试
1. [jifeng@jifeng04 .ssh]$ ssh jifeng02
2. Last login: Thu Aug 7 16:37:55 2014 from jifeng04
3. [jifeng@jifeng02 ~]$
4:如果ssh的端口不是22,可用下面命令
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 23 jifeng@jifeng03"
linux系统配置免密码的方式:
1:ssh-keygen -t rsa
生成密钥
2:ssh-copy-id -i ~/.ssh/id_rsa.pub jifeng@jifeng02
把本机的公钥追到jifeng02的 .ssh/authorized_keys 里
3:测试
1. [jifeng@jifeng04 .ssh]$ ssh jifeng02
2. Last login: Thu Aug 7 16:37:55 2014 from jifeng04
3. [jifeng@jifeng02 ~]$
4:如果ssh的端口不是22,可用下面命令
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 23 jifeng@jifeng03"
标签:jifeng02,rsa,ssh,copy,id,jifeng From: https://blog.51cto.com/u_2700990/6791067