container: Add IdentitiesOnly option to SSH

- Invoke ssh with the 'IdentitiesOnly` option enabled in order to
force the use of the configured authentication identity. This is
needed in situations where ssh-agent offers many different identities.

Closes #2243

Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Cosmin Humeniuc 2022-08-06 16:36:55 +03:00 committed by Veiko Aasa
parent b372c2e2fa
commit bd71f9667c
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -918,6 +918,7 @@ def _get_ssh_command(ip_address, distribution):
'ssh', '-Y', '-C', '-t', '-i',
str(public_key), '-o', 'LogLevel=error', '-o',
'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null',
'-o', 'IdentitiesOnly=yes',
f'fbx@{ip_address}'
]