ssh-keygen

Tags
ssh
Created
May 6, 2016 4:15 AM

ssh-keygen -o

ssh 会把你每个你访问过的计算机的公钥(public key)都记录在~/.ssh/known_hosts。当下次访问相同计算机时,OpenSSH 会核对公钥。如果公钥不同,OpenSSH 会发出警告, 避免你受到 DNS Hijack 之类的攻击。

需要移除原 known_hosts 中储存的 host 信息

ssh-keygen -f "/home/upyun/.ssh/known_hosts" -R [gitlab.widget-inc.com]:65422

或者:

修改配置文件“~/.ssh/config”,加上这两行,重启服务器。#安全性低

StrictHostKeyChecking no # 免 yes

UserKnownHostsFile /dev/null # 免known_hosts

生成 key:https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

SuperMade with Super