@@ -1352,6 +1352,7 @@ def node_ssh_client(apiobj_node_name_or_qname=None,
13521352 port = 22 ,
13531353 username = None ,
13541354 password = None ,
1355+ key_filename = None ,
13551356 auto_add_host = True ,
13561357 connect_timeout = 600 ,
13571358 through_client_host = True ,
@@ -1365,6 +1366,7 @@ def node_ssh_client(apiobj_node_name_or_qname=None,
13651366 :param port: The ssh port
13661367 :param username: The username to use
13671368 :param password: The username's password
1369+ :param key_filename: The filename of optional private key and/or cert to try for authentication
13681370 :param auto_add_host: Whether to auto accept host certificates
13691371 :param connect_timeout: Connection timeout
13701372 :param through_client_host: If True, and client_host is being used, ssh will be initiated
@@ -1423,8 +1425,8 @@ def node_ssh_client(apiobj_node_name_or_qname=None,
14231425 password = cur_context ().get_ssh_password ()
14241426
14251427 ssh_client .connect (hostname = address , port = port , username = username ,
1426- password = password , timeout = connect_timeout ,
1427- sock = host_sock )
1428+ password = password , key_filename = key_filename ,
1429+ timeout = connect_timeout , sock = host_sock )
14281430
14291431 # Enable agent fowarding
14301432 paramiko .agent .AgentRequestHandler (ssh_client .get_transport ().open_session ())
@@ -1439,6 +1441,7 @@ def node_ssh_await(apiobj_node_name_or_qname=None,
14391441 port = 22 ,
14401442 username = None ,
14411443 password = None ,
1444+ key_filename = None ,
14421445 auto_add_host = True ,
14431446 through_client_host = True ,
14441447 address_type_pref = "ExternalDNS,ExternalIP,Hostname" ):
@@ -1449,6 +1452,7 @@ def node_ssh_await(apiobj_node_name_or_qname=None,
14491452 :param port:
14501453 :param username:
14511454 :param password:
1455+ :param key_filename:
14521456 :param auto_add_host:
14531457 :param through_client_host:
14541458 :param address_type_pref:
@@ -1464,6 +1468,7 @@ def node_ssh_await(apiobj_node_name_or_qname=None,
14641468 port = port ,
14651469 username = username ,
14661470 password = password ,
1471+ key_filename = key_filename ,
14671472 auto_add_host = auto_add_host ,
14681473 connect_timeout = 25 ,
14691474 through_client_host = through_client_host ,
@@ -1482,6 +1487,7 @@ def node_ssh_client_exec(apiobj_node_name_or_qname=None,
14821487 port = 22 ,
14831488 username = None ,
14841489 password = None ,
1490+ key_filename = None ,
14851491 auto_add_host = True ,
14861492 connect_timeout = 600 ,
14871493 through_client_host = True ,
@@ -1497,6 +1503,7 @@ def node_ssh_client_exec(apiobj_node_name_or_qname=None,
14971503 :param port: The ssh port
14981504 :param username: The username to use
14991505 :param password: The username's password
1506+ :param key_filename: The filename of optional private key and/or cert to try for authentication
15001507 :param auto_add_host: Whether to auto accept host certificates
15011508 :param connect_timeout: Connection timeout
15021509 :param through_client_host: If True, and client_host is being used, ssh will be initiated
@@ -1511,6 +1518,7 @@ def node_ssh_client_exec(apiobj_node_name_or_qname=None,
15111518 port = port ,
15121519 username = username ,
15131520 password = password ,
1521+ key_filename = key_filename ,
15141522 auto_add_host = auto_add_host ,
15151523 connect_timeout = connect_timeout ,
15161524 through_client_host = through_client_host ,
0 commit comments