我有一个现有的rsync帐户的LDAP服务器。 我想用它来在我的所有服务器之间scp文件。 我将rsync用户的公钥添加到/.ssh/authorized_keys文件中,并尝试scp 。 错误如下:
[rsync@magdev2 fail2ban]$ scp jail.local [email protected]:/tmp The authenticity of host 'abc.com (10.104.0.24)' can't be established. ECDSA key fingerprint is 5a:7e:d8:ce:58:8b:45:27:56:ac:b8:be:d2:a9:9e:33. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'abc.avery.com,10.104.0.24' (ECDSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). lost connection [rsync@magdev2 fail2ban]$
有没有办法让我做到这一点?
man ssh-keyscan
ssh-keyscan是一个实用程序,用于收集许多主机的公共ssh主机密钥。 它旨在帮助构build和validationssh_known_hosts文件。 ssh-keyscan提供了一个适用于shell和perl脚本的最小界面。