Windows: How to change Windows RDP Port Number

To change your Windows RDP (Remote Desktop Protocol) port number to other,

1. Open Registry Editor,

C:\> regedit

2. Navigate to,

HKEY_LOCAL_MACHINE -> System -> CurrentControlSet -> Control ->Terminal Server -> WinStations -> RDP-Tcp

3. Look at “Port number” and select Decimal.

4. Change to any number that you need and perform a reboot if it is not apply immediately.

Howto: Change Windows Server 2003 RDP Port

By default, Windows Terminal Server and Remote Desktop Protocol (RDP) listen on TCP port 3389.

To change the port to your custom port, you may refer to below:-

1. Open the registry editor.
2. Navigate to,

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

3. Find the “PortNumber” and change to your needed port.

To be secure, reboot your server to apply new port.

Remote Desktop Connection Manager (RDCMan)

RDCMan manager (Remote Desktop Connection Manager) could manage multiple remote desktop connection. It is useful when if you are the server administrator that manage multiple server or labs. It is not a new technology but it is use to group your remote desktop connection to one application and allow you to manage them with some advance setting.

You may download it at here .

Then open the application and add the remote desktop connection.

You may get the thumbnail view as below as well.

Double click on the title and you may enlarge the screen.

How to use Linux Screen

Screen is one of the powerful command in Linux(Unix System) that allow user to run command in remote mode and this is to avoid connection timed out or etc issue causing the previous launched command stopped.

You may install screen by running yum or apt-get depending on your box, then you can start screen by typing screen at the command prompt.

screen

Once screen session has started, you can use the following commands to mess around:

– Ctrl + A + ‘c’ = To open a New Windows
– Ctrl + A + ‘n’ = next window (if you have multiple windows running)
– Ctrl + A + ‘0…9’ = go to window number x where it should come with 0 to 9.
– Ctrl + A + ‘d’ = detach from a window. Say, if you want to close your session and return later.
– Ctrl + ‘d’ = detach and clear the screen session,

To re-attach to a screen, you may need to check the number of screen is running.

screen -ls


This will display the screens currently running, you could run the command as below to resume the screen session.
[code]$ screen -x pid.tty.user[/code]