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 authored and Veiko Aasa committed 2022-08-09 19:48:22 +03:00
1 parent b372c2e2fa
commit bd71f9667c
1 file changed
+1
+1
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}'
]