Skip to content

Latest commit

 

History

History
204 lines (123 loc) · 7.5 KB

rdp.md

File metadata and controls

204 lines (123 loc) · 7.5 KB

To start the Remote Desktop service in Windows, follow these steps:

Method 1: Using Services Management Console

Open Services Management Console:
    Press Win + R to open the Run dialog.
    Type services.msc and press Enter.

Locate Remote Desktop Services:
    In the Services window, scroll down and locate the service named Remote Desktop Services.
    The service may also be listed as TermService.

Start the Service:
    Right-click on Remote Desktop Services and select Start from the context menu.

Method 2: Using Command Prompt

Open Command Prompt as Administrator:
    Press Win + X and select Command Prompt (Admin) or Windows PowerShell (Admin).
    Alternatively, press Win + R, type cmd, and press Ctrl + Shift + Enter to open Command Prompt with administrative privileges.

Start the Remote Desktop Service:
    In the Command Prompt, type the following command and press Enter:

    shell

    net start TermService

Method 3: Using PowerShell

Open PowerShell as Administrator:
    Press Win + X and select Windows PowerShell (Admin).
    Alternatively, press Win + R, type powershell, and press Ctrl + Shift + Enter.

Start the Remote Desktop Service:
    In PowerShell, type the following command and press Enter:

    powershell

    Start-Service -Name "TermService"

Method 4: Enable Remote Desktop

Ensure that Remote Desktop is enabled in your system settings.

Open Settings:
    Press Win + I to open the Settings app.

Navigate to Remote Desktop Settings:
    Go to System > Remote Desktop.

Enable Remote Desktop:
    Toggle the switch to On to enable Remote Desktop.
    Confirm any prompts that appear.

Additional Settings (optional):
    Click on Advanced settings to configure network level authentication and other settings if necessary.

Notes:

Administrator Privileges: You need administrative privileges to start, stop, or configure services.
Firewall Settings: Ensure that your firewall settings allow Remote Desktop connections. You may need to configure this in Control Panel > System and Security > Windows Defender Firewall > Allow an app or feature through Windows Defender Firewall.
Network Configuration: For remote connections, ensure that your network configuration (such as NAT and port forwarding) is correctly set up to allow incoming Remote Desktop connections, especially if connecting from outside the local network.

Following these steps should help you start the Remote Desktop service on your Windows machine.

INCASE OF ERROR MESSAGES The error message you're seeing indicates an account restriction issue during the Network Level Authentication (NLA) phase. This typically happens due to several possible reasons:

Incorrect Credentials: Ensure the username and password are correct.
User Account Restrictions: The user account might be restricted from remote access.
Security Settings: Windows may have security settings preventing the connection.

Here's how to troubleshoot and resolve the issue: Step 1: Verify Credentials

Ensure the username and password you are using are correct and that the account has permissions to log in via Remote Desktop. Step 2: Check User Account Permissions

Ensure the user account is allowed to connect remotely:

On the Windows Machine:
    Open System Properties: Press Win + R, type sysdm.cpl, and press Enter.
    Go to the Remote tab.
    Ensure Allow remote connections to this computer is checked.
    Click on Select Users and ensure the user account you are using is listed.

Step 3: Adjust Group Policy Settings (If Applicable)

If you're on a domain or have group policies applied, ensure the policies are not restricting the account:

Open Group Policy Editor: Press Win + R, type gpedit.msc, and press Enter.
Navigate to:

sql

Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment

Double-click Allow log on through Remote Desktop Services and ensure your user or a group that includes your user is listed.

Step 4: Bypass NLA (If Necessary)

If the above steps don't resolve the issue, you can try bypassing NLA (Network Level Authentication):

Disable NLA on the Windows Machine:
    Open System Properties: Press Win + R, type sysdm.cpl, and press Enter.
    Go to the Remote tab.
    Uncheck Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended).
    Click Apply and OK.

Step 5: Connect Using FreeRDP with NLA Disabled

You can also try connecting with FreeRDP while disabling NLA:

Use the following command:

bash

xfreerdp /v:192.168.160.128 /u:netsec +sec-nla

This command disables NLA, which may help if the issue is related to authentication mechanisms.

Step 6: Check Windows Firewall Settings

Ensure that the Windows Firewall is not blocking RDP connections:

Open Control Panel.
Go to System and Security > Windows Defender Firewall > Allow an app or feature through Windows Defender Firewall.
Ensure Remote Desktop is allowed for both Private and Public networks.

Step 7: Verify RDP Service is Running

Ensure that the Remote Desktop service is running on the Windows machine:

Open Services: Press Win + R, type services.msc, and press Enter.
Locate Remote Desktop Services.
Ensure the service is running. If not, right-click and select Start.

By following these steps, you should be able to resolve the connection issue and successfully connect to the Windows machine using xfreerdp.

If the Windows account you are trying to connect to does not have a password, you can omit the /p: option in the xfreerdp command. Here's how you can adjust your command:

bash

xfreerdp /v:192.168.160.128 /u:netsec

Additionally, if the Windows machine is configured to not allow remote connections from accounts without a password, you may need to modify the local security policy on the Windows machine to allow this: Allowing Remote Desktop Connections Without a Password

Open Local Security Policy:
    Press Win + R, type secpol.msc, and press Enter.

Navigate to Security Options:
    Go to Local Policies > Security Options.

Adjust Policy:
    Find the policy named Accounts: Limit local account use of blank passwords to console logon only.
    Double-click on this policy and set it to Disabled.

Apply Changes and Restart:
    Click Apply and OK.
    Restart the Windows machine to ensure the changes take effect.

Connect Using FreeRDP

After ensuring the Windows machine allows remote connections from accounts without a password, try connecting again using the simplified xfreerdp command:

bash

xfreerdp /v:192.168.160.128 /u:netsec

If you still encounter issues, consider the following:

NLA (Network Level Authentication) might still require credentials. If you disabled NLA previously, ensure it's still disabled.
Ensure Remote Desktop is enabled and correctly configured on the Windows machine.

Optional: Disable NLA on Windows

To disable NLA:

Open System Properties:
    Press Win + R, type sysdm.cpl, and press Enter.

Remote Tab:
    Go to the Remote tab.
    Uncheck Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended).

Apply Changes:
    Click Apply and OK.

Try connecting again with xfreerdp:

bash

xfreerdp /v:192.168.160.128 /u:netsec

This should allow you to connect without specifying a password if the account has none.