Search code examples
sql-server-2008powershellconnectionpowershell-remoting

Connect to sql server via transitional computer issue, login failed for NT AUTHORITY\ANONYMOUS LOGON


I have SQL Server 2008 to which I can connect using domain user credentials. There are many computers in the network and if I login under that domain user I can successfully connect to SQL Server (using Windows Authentication).

The problem is when I use PowerShell remoting and establish remote session from computer A to computer B. When I run our dbtool that tries to connect to SqlServer (in remote session) "login failed for NT AUTHORITY\ANONYMOUS LOGON" error occurs.

It's strange, because I establish remote session under same domain user. Why ANONYMOUS is being passesd to SqlServer?

Thanks for help


Solution

  • And once again I'm answering my own question due to lack of other answers.

    Computers communication chain: A -> B -> C.

    So the problem is indeed with Kerberos authorization delegation feature (more there: http://alt.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsDelegation.html). When I establish remote session from computer A to computer B, computer B sends to computer C null session (because delegation is disalloved). Thats why SQL Server on computer C sees me as NT AUTHORITY\ANONYMOUS LOGON.

    My current workaround is to talk to SQL Server from computer A (copy necessary utilities there), because I have no way to enable delegation. For this scenarion computer A sends correct authorization token to computer C.