mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #29336 from rallytime/bp-29276
Back-port #29276 to 2015.5
This commit is contained in:
commit
51ea88d489
1 changed files with 1 additions and 1 deletions
|
@ -919,7 +919,7 @@ def set_known_host(user=None,
|
|||
if key:
|
||||
remote_host = {'hostname': hostname, 'enc': enc, 'key': key}
|
||||
|
||||
if hash_known_hosts or port == DEFAULT_SSH_PORT:
|
||||
if hash_known_hosts or port == DEFAULT_SSH_PORT or ':' in remote_host['hostname']:
|
||||
line = '{hostname} {enc} {key}\n'.format(**remote_host)
|
||||
else:
|
||||
remote_host['port'] = port
|
||||
|
|
Loading…
Add table
Reference in a new issue