You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this above code but I'm not able to connect to windows host .. I have the right credentials as i am able to login manually.
I tried different transport methods
for ntlm,ssl and plaintext transport methods I get this below error:
<class 'winrm.exceptions.InvalidCredentialsError'>
<class 'Exception'> the specified credentials were rejected by the server
and for kerberos transport method I get :
<class 'winrm.exceptions.WinRMError'>
<class 'Exception'> requested auth method is kerberos, but requests_kerberos is not installed .....(i have installed requests_kerberos).
The text was updated successfully, but these errors were encountered:
this helped me, it had to do with the escape characters to properly format the domain & username entry.
self.username = f'{domain}\{username}' if domain else username
p = Protocol(
endpoint=endpoint,
transport='ntlm',
username=self.username,
password=self.password,
server_cert_validation='ignore',
operation_timeout_sec=1000, # Set timeout to 120 seconds
read_timeout_sec=1200 # Set read timeout to 240 seconds (greater than operation timeout)
)
self.shell_id = p.open_shell()
return p
import winrm
host = 'YourWindowsHost'
domain = 'YourDomain'
user = 'YourDomainUser'
password = 'YourPassword'
session = winrm.Session(host, auth=('{}@{}'.format(user,domain), password), transport='ntlm')
I have this above code but I'm not able to connect to windows host .. I have the right credentials as i am able to login manually.
I tried different transport methods
for ntlm,ssl and plaintext transport methods I get this below error:
<class 'winrm.exceptions.InvalidCredentialsError'>
<class 'Exception'> the specified credentials were rejected by the server
and for kerberos transport method I get :
<class 'winrm.exceptions.WinRMError'>
<class 'Exception'> requested auth method is kerberos, but requests_kerberos is not installed .....(i have installed requests_kerberos).
The text was updated successfully, but these errors were encountered: