小编eme*_*ava的帖子

Ansible PreferredAuthentications SSH 设置从何而来?

我正在使用 SSH 用户名和密码设置运行标准的 ansible (v2.3.1) 剧本。使用“-vvvv”设置时,我可以看到生成了这些 SSH 命令

EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s 
-o StrictHostKeyChecking=no -o Port=2222 
-o KbdInteractiveAuthentication=no 
-o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o User=dc_user -o ConnectTimeout=10
Run Code Online (Sandbox Code Playgroud)

在上述情况下,从何处提取“PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey”设置。我相信这些来自客户端 SSH 配置设置,但这是正确的吗?

我知道我可以通过在我的“ansaible.cfg”中定义它来覆盖 ssh 参数

[ssh_connection]
scp_if_ssh=True
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey
Run Code Online (Sandbox Code Playgroud)

谁可以给我解释一下这个?谢谢

ssh ansible ansible-playbook

3
推荐指数
1
解决办法
4087
查看次数

标签 统计

ansible ×1

ansible-playbook ×1

ssh ×1