在serverA中,我使用sudo用户创建了一个SSH密钥(id_rsa),并将公钥复制到serverB (到同一个sudo用户的authorized_keys文件中)。ansible_host=IP_new
ansible_user=sudo_useransible_ssh_private_key_file=~/.ssh/id_rsa- name: Transfer files from prod to new server
all_data/test/ dest=/opt/nlp-ml/rate/Pipeline dirs=yes我用我的剧本试过了,但却失败了:
msg: Warning: Identityfile /Users/me/me.pem not accessible: No such file or directory.之后,
当从subprocess.popen执行SCP时,我会收到错误:Warning: IdentityFile ./id_rsa.key not accessible: no such file or directory.,问题将在下面解释。当我输入密码时,它会抛出下面的错误,表明它找不到RSA密钥:
<_io.TextIOWrapper name='<stderr>' mode='w' encoding='ut
user@%s" % host, command], stdout=subprocess.PIPE, 我得到了一个错误:
['Warning: Identityfile /Users/saurabh.araiyer/.ssh/anotherIdentity not accessible: No such file or directory
SFTP to MFT ## Execute SFTP command to PUT a fileon MFT ## $2 - SFTP User ID @ MFT ServerSource Directory (to take files from) #
# $4 - MFT Directory (to place
: Identityfile /home/peng/.ssh/saphana.pem not accessible: No such file or directory.: Identityfile /home/peng/.ssh/saphana.pem not accessible: No such file or directory.</e