Salt SSH appends IdentityFile=agent-forwarding

When you set `ssh_priv: agent-forwarding` in master.conf (or, untested, `priv: agent-forwarding` in roster), SSH agent authentication is supposed to be used.

However, Salt SSH launches with `ssh -o IdentityFile=agent-forwarding`. 
This file/dir can't be found (doh) and the connection fails.
This commit is contained in:
Ronald van Zantvoort 2018-08-08 23:49:22 +02:00 committed by GitHub
parent 4590494b50
commit 8b53571c70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,7 +138,7 @@ class Shell(object):
options.append('UserKnownHostsFile={0}'.format(known_hosts))
if self.port:
options.append('Port={0}'.format(self.port))
if self.priv:
if self.priv and self.priv != 'agent-forwarding':
options.append('IdentityFile={0}'.format(self.priv))
if self.user:
options.append('User={0}'.format(self.user))