// -i 后面是私钥 // Connection to ssh.github.com port 443 [tcp/https] succeeded! // Hi unix2dos! You've successfully authenticated, but GitHub does not provide shell access.
1.4 添加到config, git使用私钥
1 2 3 4 5 6
Host github.com HostName ssh.github.com IdentityFile ~/.ssh/github-unix2dos User unix2dos Port 443 ProxyCommand nc -v -x 127.0.0.1:7890 %h %p
2. gitlab
2.1 添加到gitee里面
1 2 3
cat ~/.ssh/fhyx.pub
ssh-rsa .....== levonfly@gmail.com
2.2 测试是否连接, 现在带上私钥
1 2
ssh -T git@git.work.work -i ~/.ssh/fhyx Welcome to GitLab, @liuwei!
2.3 添加到config, git使用私钥
1 2 3 4 5 6
Host git.work.work PubkeyAcceptedKeyTypes=+ssh-rsa PubkeyAcceptedAlgorithms=+ssh-rsa HostName git.work.work IdentityFile ~/.ssh/fhyx User liuwei