def _try_passwordless_paramiko(server, keyfile):
if paramiko is None:<EOL><INDENT>msg = "<STR_LIT>"<EOL>if sys.platform == '<STR_LIT:win32>':<EOL><INDENT>msg += "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>msg += "<STR_LIT>"<EOL><DEDENT>raise ImportError(msg)<EOL><DEDENT>username, server, port = _split_server(server)<EOL>client = paramiko.SSHClient()<EOL>client.load_system_host_keys()<EOL>client.set_missing_host_key_policy(paramiko.WarningPolicy())<EOL>try:<EOL><INDENT>client.connect(server, port, username=username, key_filename=keyfile,<EOL>look_for_keys=True)<EOL><DEDENT>except paramiko.AuthenticationException:<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>client.close()<EOL>return True<EOL><DEDENT>
Try passwordless login with paramiko.