测试连接时,您需要使用密码验证此操作,密码是您之前创建的SSH密钥密码。
打开你的终端窗口。
使用以下命令:
$ ssh -vT xxx.com
# Attempts to ssh to xxx.com
可能会常出现以下提示信息:
> debug1: Authentication succeeded (publickey).
> Authenticated to xxx.com ([xx.xx.xx.xx]:xx).
> debug1: channel 0: new [client-session]
> debug1: Entering interactive session.
> debug1: pledge: network
> debug1: Sending environment.
> debug1: Sending env LANG = zh_CN.UTF-8
> shell request failed on channel 0
说明
表示使用ssh的方式,连通性已经验证通过:
Authenticated to xxx.com ([xxx.xxx.xxx.xxx]:xxx).
如果添加公共秘钥成功后,git pull 时,终端提示:
The authenticity of host 'xxx.com (xxx.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is SHA256:wbrJ0Tsw8h90yQYSkRHtGO5vEUrCo9GgIgdWJ9HdQY.
Are you sure you want to continue connecting (yes/no)?
直接输入 yes 即可