Sql-server – Linux sqlcmd connecting to Windows Sql Server using kerberos

active-directorysql serversqlcmdUbuntu

I'm pretty sure I am going to have to expand upon this a bit as I am new, and my question is probably not clear.

I have an Active Directory environment that includes a Microsoft SQL Server running Windows Server. The SQL server is using "Windows Authentication Mode." It looks like Microsoft does not support "Windows Authentication Mode" when using sqlcmd from Linux unless it's Azure (correct me if I am wrong), so I am trying to create a service account and then generate a Kerberos ticket for that account. The problem is I am not even sure where to start. I did find some information around how-to create a service account and, maybe, a Kerberos ticket for that. But how do I use this on Linux afterward? If you know some existing guides that I missed on this topic feel free to point me there.

Thanks

Best Answer

Try this guide: Tutorial: Use Active Directory authentication with SQL Server on Linux

And then go to point:
Connect to SQL Server using AD Authentication

Basically you will need to ssh to the client using your AD credentials and the run sqlcmd without credentials

ssh -l user@contoso.com client.contoso.com  
sqlcmd -S mssql-host.contoso.com