Fixes in tsk
This commit is contained in:
parent
43f69c6c2d
commit
6ac7e7598a
1 changed files with 10 additions and 0 deletions
|
|
@ -134,6 +134,16 @@ class Task:
|
||||||
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
|
||||||
add_host=True
|
add_host=True
|
||||||
|
else:
|
||||||
|
|
||||||
|
if self.port!=22:
|
||||||
|
|
||||||
|
if check_ssh_host.lookup('[{}]:{}'.format(self.server, self.port))==None:
|
||||||
|
|
||||||
|
#Be tolerant and save if port is different
|
||||||
|
|
||||||
|
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
add_host=True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue