How to enable Single Sign-On for my Terminal Server connections

How to enable Single Sign-On for my Terminal Server connections

  • Comments 58
Note: This post was updated on March 12, 2009, to include the latest information. 

What is Single Sign-On?

When applied to Terminal Services, Single Sign-On means using the credentials of the currently logged on user (also called default credentials) to log on to a remote computer. If you use the same user name and password logging on to your local computer and connecting to a Terminal Server, enabling Single Sign-On will allow you to do it seamlessly, without having to type in your password again.

Locally logged on credentials are used for connecting to TS Web Access, however, they cannot be shared across TS Web Access and TS or TS Gateway. Thus you will need to enable the Group Policy settings described below in order to use locally logged on credentials for TS or TS Gateway connections.

How to enable Single Sign-On?

Single sign-On can be enabled using domain or local group policy.

  1. Log on to your local machine as an administrator.
  2. Start Group Policy Editor - "gpedit.msc".
  3. Navigate to "Computer Configuration\Administrative Templates\System\Credentials Delegation".
    Group Policy Editor
  4. Double-click the "Allow Delegating Default Credentials" policy.
  5. Enable the policy and then click on the "Show" button to get to the server list.
    Group Policy 
  6. Add "TERMSRV/<Your server name>" to the server list. You can add one or more server names. Using one wildcard (*) in a name is allowed. For example to enable Single Sign-On to all servers in "MyDomain.com" you can type "TERMSRV/*.MyDomain.com". (Notice the "Concatenate OS defaults with input above" checkbox on the picture above. When this checkbox is selected your servers are added to the list of servers enabled by OS by default. For Single Sign-On this default list is empty, so the checkbox has no effect.)
    Group Policy Value
  7. Confirm the changes by clicking on the "OK" button until you return back to the main Group Policy Object Editor dialog.
  8. At a command prompt, run "gpupdate" to force the policy to be refreshed immediately on the local machine.
  9. Once the policy is enabled you will not be asked for credentials when connecting to the specified servers.

What are the limitations when using Single Sign-on?

  • Single Sign-On works only when connecting from an XP SP3, Vista or a Windows Server 2008 machine to a Vista or Windows Server 2008 machine. Please see this KB article about enabling CredSSP on XP SP3 which is required for Single Sign-On.
  • If the server you are connecting to cannot be authenticated via Kerberos or SSL certificate, Single Sign-On will not work. You can circumvent this restriction by enabling "Allow Default Credentials with NTLM-only Server Authentication" policy, which is less secure. (NTLM-only Server Authentication is less secure compared to using Certificates or Kerberos.)
  • If you have saved credentials for the target machine they take precedence over the current credentials.
  • Single Sign-On works only when using domain user accounts. Please see section below regarding user experience for non-domain clients.
  • If the Terminal Server connection is configured to go through a TS Gateway server then in some cases the settings of the TS Gateway server can override the TS Single Sign-on setting.
  • If the terminal server is configured to Always prompt or RDP file setting Always prompt, then Single Sign-on to TS will not work.
  • Single Sign-on only works with Passwords. Does not work with Smartcards.

Why is Single Sign-On controlled by Group Policy?

As a part of the logon process TS Client sends the actual user credentials (user name and password) to the server. If a code running as a regular user were allowed to enable Single Sign-On, any malicious software (virus, Trojan, spyware etc.) running in the user's session would be able to send the user's password to any machine on the network. So, only administrators should be allowed to decide which servers are safe for Single Sign-On.

Thus Single Sign-On can only be enabled on domain-joined client machines.

What if I have Single Sign-On enabled but want to use different credentials this time?

Start TS Client. Click the "Options" button. Select the "Always ask for credentials" checkbox. You will be asked for credentials next time you connect.

TS Client

How do I enable Single Sign-on for TS Gateway Server?

  1. On a Vista machine open up the "Group Policy Object Editor" by entering "gpedit.msc" at a command prompt.
  2. Navigate to "User Configuration", "Administrative Templates", "Windows Components", "Terminal Services", "TS Gateway" and select the "Set TS Gateway server authentication method" setting:
    Group Policy Editor
  3. Select the "Enabled" radio button.
  4. Under "Set TS Gateway server authentication method", click on the combo-box and select "Use locally logged-on credentials".
  5. If you want the users to be able to override this authentication method then select "Allow users to change this setting" checkbox.
    Group Policy
  6. Confirm the changes by clicking on the "OK" button until you return back to the main Group Policy Object Editor dialog.
  7. At a command prompt, run "gpupdate" to force the policy to be refreshed immediately on the local machine.
  8. Start up the TS client and navigate to "Options", "Advanced", click on "Settings" under "connect from anywhere". You should see the status text indicate the following: "Your Windows logon credentials will be used to connect to this TS Gateway server".
    image
  9. That's it! The client will now be able to connect to the gateway server ("gateway.microsoft.com" in the above example) using locally logged on credentials. Of course, if you want to use another set of credentials, you should select the "Allow users to change this setting" checkbox in the Group Policy Editor in Step-5 to bypass using the locally logged on credentials.

What if I am connecting from a non-domain joined client machine?

If you have a non-domain client, then you cannot get single sign-on by using locally logon credentials to authenticate with TSG and TS since administrator cannot deploy single sign-on group policies to the non-domain client machines.

Thus, to provide the best connection experience for non-domain clients through TS Gateway, set the option “Use my TS Gateway credentials with remote server option” in RDP file or in the mstsc client advanced setting menu as per screenshot below. This will ensure that end users are prompted for credentials only once during the connection experience.

 

image

Can the user get Single Sign-On experience when logging on using a Smart Card?

No. Unfortunately if a Smart Card is used to log on locally to the machine, these credentials cannot be used for Single Sign-On. Please also note that you cannot save Smart Card credentials in TS connections either.

Leave a Comment
  • Please add 5 and 8 and type the answer here:
  • Post
  • Nu finns det en guide för hur man konfigurerar SSO mellan en VISTA/Longhorn klient till en VISTA/Longhorn...

  • Is it possible to provide SSO for Terminal Services in Win2k3 Server and XP/Win2k3 as clients?

  • Unfortunately it's not possible, because SSO requires using a special Security Support Provider currently available only in Vista.

  • If I understood the explanation correctly, you use also a username and password to authenticate from Vista to Longhorn. The difference is that the username and password are cached and sent without user intervention.

    No way to rely on kerberos authentication and constrained delegation ?

  • Dans un domaine windows, on est authentifi&amp;#xE9; pour quasiment tous les services via Kerberos sans

  • I've just foudn out that SSO will be available on XP SP3. Dev. has ported CredSSP back to XP SP3.

  • Someone from MS Dev. need to confirm that SSO will work with WinXP SP3.

  • Mark,

    Unfortunately, SSO will not be supported on XP SP3.

    I'm sorry for the confusion.

    Sergey.

  • I was just in the Webcast today on Security in Terminal Servers and the presenter had XP SP3 in the list as supported for SSO.

    Was that old information?

  • BTW, it does work in XP SP3 RC1; however, the group policy templates don't provide for a means to make the change.

    Make the change on a vista box and export the registry key and it will work on XP.  Tried with SP2/RDP 6.1 client, that's a no-go, SP3 *IS* required.

  • Can anyone else confirm SSO works in XP Sp3?

  • Can someone post the registry changes required for the SSO to function on an XP machine?

  • Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation]

    "AllowDefaultCredentials"=dword:00000001

    "ConcatenateDefaults_AllowDefault"=dword:00000001

    "AllowDefCredentialsWhenNTLMOnly"=dword:00000001

    "ConcatenateDefaults_AllowDefNTLMOnly"=dword:00000001

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowDefaultCredentials]

    "1"="TERMSRV/<My Server1>"

    "2"="TERMSRV/<My Server2>"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowDefCredentialsWhenNTLMOnly]

    "1"="TERMSRV/<My Server1>"

    "2"="TERMSRV/<My Server2>"

    Replace "<My Server1>", "<My Server2>", etc. with the real server names.

    Do not use AllowDefCredentialsWhenNTLMOnly unless it is absolutely necessary. It is to enable SSO when Kerberos or SSL server authentication is not possible, and it is not very secure (you may end up sending your password to a wrong server).

  • Thanks! Hopefully I can get it to work.

  • I suppose this could be pushed out using GPO to XPSP3 PCs. Has anyone done it?

Page 1 of 4 (58 items) 1234