How to connect to non-local MS SQL Server from WSL2 using Python and Windows Authentication?

Viewed 13

I'm trying to connect to a MS SQL Server which is not running on my local machine. I'm using a python script developed on WSL2 with pyodbc, but I need to sign into the SQL server with Windows Authentication.

Is there a way to achieve this?

1 Answers

Windows Authentication means either NTLM or Kerberos. NTLM is not available for ODBC on Linux, so you must use Kerberos on MacOS or Linux.

Related