dengnan123 / Daily_Record

记录日常点滴知识点
2 stars 0 forks source link

MAC上免密登录服务器配置 #29

Open dengnan123 opened 5 years ago

dengnan123 commented 5 years ago
cd ~/.ssh

vi config

按照如下格式配置

host "dp"
HostName "192.168.10.93"
User "root"
Port 22

host "dtest"
HostName "139.217.118.213"
User "dfadmin"
Port 22

然后保存退出 最后执行

ssh-copy-id -i id_rsa.pub 用户名@服务器IP
dengnan123 commented 4 years ago
ssh-copy-id -i id_rsa.pub root@111.111.111.111