title: How do I connect to a kerberos authenticated REST service in Python on Windows
body: <p>I am trying to create a very simple Python script to download the contents of an internal service at my company that sits within our firewall and authenticates using kerberos.</p>
  
  <p>When I installed the requests_kerberos module I first edited the <code>import kerberos</code> in it to use <code>import kerberos_sspi as kerberos</code> instead after having installed the <code>kerberos_sspi</code> module.</p>
  
  <p>Thus I have the following Python script</p>
  
  <pre><code>import requests
  from requests_kerberos import HTTPKerberosAuth
  
  response = requests.get('http://service.internaldomain',auth=HTTPKerberosAuth())
  
  print response
  </code></pre>
  
  <p>While trying to process the 401 it crashes out with the error.</p>
  
  <pre><code>error: (-2146893053, 'InitializeSecurityContext', 'The specified target is unknown or unreachable')
  </code></pre>
  
  <p>While looking into seeing if I could do this with <code>curl</code> instead I ran <code>kinit</code> and noticed that it asked me for the password to authorisation with the following prompt:</p>
  
  <pre><code>Password for username@additionalInternalDomain.internaldomain
  </code></pre>
  
  <p>Thus I wondered if this might be what is causing the issue. </p>