服务器:CentOS 7.3
在远程连接中,建立了
su git
mkdir ~/.ssh
vim ~/.ssh/authorized_keys
然后把公钥复制进去保存
chmod 600 /home/git/.ssh/authorized_keys
chmod 700 /home/git/.ssh
给权限后,本地git测试ssh拒绝连接
debug1: hostkeys_find_by_key_hostfile: hostkeys file /c/Users/11093/.ssh/known_hosts2 does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist
The authenticity of host '120.27.224.88 (120.27.224.88)' can't be established.
ED25519 key fingerprint is SHA256:9jbVGN7tr6E9/+7X7JJztxcVcFgNUAEqHdrnHB+F8rw.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?