How to Manage Computers Remotely (Windows and Linux)

Photo of author

By Victor Ashiedu

Published

If you’re a Systems Administrator or work on computers in any capacity in an enterprise environment, you may need to manage computers remotely. Learn the various methods to connect to a remote computer.

Overview

The method available to remotely manage a PC or server depends on the operating system. However, if you need to access a computer from another computer, you must meet two requirements:

  1. The PC must be configured to allow remote connection and management
  2. You must have the credentials that are permitted to access the computer remotely

Earlier, I mentioned that the method of remote connection depends on the operating system. Following up on that, if you need to remotely administer a Windows computer, you can use Remote Desktop (RDP), Computer Management, or PowerShell.

However, to connect to a Linux box, you can use SSH.

Let’s examine the details of these methods in the sections below.

Option 1: Remote to Windows Computer via RDP

Before you can use RDP to connect to a Windows computer:

  1. RDP must be enabled on the remote computer
  2. You must have a user that belongs to the remote computer’s administrators or Remote Desktop Users group
  3. The source computer must reach the remote computer via a network

If you meet these three requirements, follow the steps below to RDP to a remote computer:

  1. Search for and open Remote Desktop from the source computer.
Option 1: Remote to Windows PC via RDP
  1. Then, when the RDP app opens, enter the name or IP address of the remote computer and click Connect. The remote computer will prompt you to enter a username and password.
  1. Enter the username with the permission to RDP to the computer. As shown in my screenshot below, Windows is attempting to connect with the credentials in my source computer but I want to use a different credential.

    So, to enter a different credential, click “More choices.” After that, select “Use a different account.”

    Finally, enter the account I want to use for the RDP connection and click OK.
  1. When you click OK, you’ll receive a certificate warning. Check the “Don’t ask me again for connections to this computer” checkbox and click Yes to continue the connection.

RDP will connect to the computer and you can work on it as if it were a local computer.

When the RDP session opens, it opens in full screen and you can minimize it like any window. I minimized it as shown in the screenshot below to enable me to take a screenshot.

Option 2: Manage Windows Computers with Computer Management

If you need to work on a Windows computer remotely, another handy tool is Computer Management.

Follow these steps to connect to a Windows computer remotely via Computer Management.

  1. Right-click the Windows start menu and select Computer Management.
Option 2: Manage a Windows Computer with Computer Management
  1. When the tool opens, right-click Computer Management (Local) and select “Connect to another computer.”
  1. Finally, enter the name or IP address of the remote computer and click OK to connect.

To confirm that you’re connected to the remote computer, its name or IP address will now be displayed where “Local” was displayed. From now, you can perform tasks on the remote computer.

Option 3: Use PowerShell to Remote to a Windows Computer

PowerShell offers many cmdlets for remote connections. However, the two most common that I have used are the New-PSSession and Enter-PSSession.

The main difference between the two is that the New-PSSession command creates a persistent connection to a remote (or local) computer.

On the contrary, the Enter-PSSession command allows you to interactively manage a remote computer.

The terms “persistent” and “interactive” will become clearer in my examples in the subsections below.

In the following two subsections, I have explained the steps to use these two cmdlets for remote management.

Method 1: Use New-PSSession for Remote Management

Before connecting to a remote computer using the New-PSSession command, you must first enable WinRM on the computer.

If you need help enabling WinRM, read my article, How to Enable WinRM to Allow Remote PowerShell Management (link opens in a new tab).

Once you set up WinRM, open PowerShell as administrator, then follow these steps to remote to a Windows computer.

  1. Create a remote PowerShell session using the command below:
$Session = New-PSSession 192.168.0.58 -Credential (Get-Credential 192.168.0.58\victor)
192.168.0.58 is the IP address of the remote computer while “192.168.0.58\victor” specifies the credential I want to use to connect to the computer. Change these two parameters as you require.
  1. When you execute the command by pressing the Enter key, PowerShell will prompt you for the account’s password. Enter the password and click OK.

The above command creates a remote session and saves it in the $Session variable.

  1. Define the command to run in the remote session.
Using the Invoke-Command to open a connection created by New-PSSession requires specifying the command to execute on the remote computer. Earlier, I mentioned that the New-PSSession command creates a persistent connection to a remote. Since the session is not interactive, you must specify the command to execute when the connection is established.

In this example, I want to create a folder called PSSession in drive C. To do this, I will create a script block with the New-Item command

$ScriptBlock = { New-Item -Path C:\Remote -ItemType Directory -Name PSSession}
  1. Finally, connect to that session using the Invoke-Command command.
Invoke-Command -Session $Session -ScriptBlock $ScriptBlock

If the command goes according to plan, PowerShell should connect to the remote computer and create the folder. Not only that, but it even tells you that it did!

I included a screenshot of the folder on the remote computer.

Method 2: Use Enter-PSSession for Remote Management

The steps for using the Enter-PSSession is like using the New-PSSession with one difference. Since the Enter-PSSession allows you to interactively execute commands on the remote computer, you DO NOT need to specify any command when you make the connection.

  1. So, the first step is to create a remote session with the Enter-PSSession. Here is a command I’m using for my demonstration.
$Session = Enter-PSSession 192.168.0.58 -Credential (Get-Credential 192.168.0.58\victor)
  1. Once you run the last command and authenticate by entering the password, PowerShell opens an interactive session to the remote computer.

    You can confirm that you’re now on the remote computer because PowerShell displays the name or IP address – depending on how you connected.

From this point, you can run PowerShell commands as though you opened a local PowerShell console locally on the remote computer.

  1. In the last subsection, I created a folder called PSSession. I can use the command below to confirm that the folder exists.
Get-Item C:\Remote

And, it does!

Option 4: Remote to a Linux Computer with SSH

So far in this guide, I have given three examples showing how to make remote connections and manage Windows computers.

But, what about remotely managing Linux computers?

To make remote connections to a Linux computer, you use the SSH command. However, as I mentioned in the Overview section of this guide, the remote computer must be configured to allow connections via SSH.

Secondly, you must have the credentials with permission to connect to the remote Linux computer.

If you’re remoting to an Ubuntu computer, use the steps in my guide – How to Enable SSH in Ubuntu 22.04.3 – to install and configure SSH on the remote Ubuntu server. In this guide, I will be using SSH to connect to my Ubuntu computer.

When you’re ready, run the command below to remote to the Linux computer.

ssh [email protected]
There are three parts of the command. The first is the ssh command. Then, the user account you want to connect with – in my example, victoradmin. Finally, the IP address (or hostname) of the remote computer – which is 192.168.0.57 in my example.

When you execute the command by pressing the enter key, the shell will prompt you for the password to the account you specified.

Once you authenticate successfully, you’ll be logged in to the destination Linux computer!

From this point, you can run commands (based on your account’s permissions) on the remote computer.

Conclusion

Systems administrators need efficient ways to manage multiple computers. Fortunately, both Windows and Linux computers have methods you can use to remotely administer them.

In this guide, I shared two GUI methods you can use to manage Windows computers remotely. In addition to the GUI methods, I discussed how to manage Windows computers using PowerShell remoting capabilities.

The guide did not leave Linux admins out in the cold!

It also covered the steps to use SSH to remote to a Linux computer.

I am confident that this step-by-step guide meets your needs. Let me know by clicking Yes to the “Was this page helpful?” question below.

We do not only seek positive feedback. If this article fell short of your expectations, please vote No to the “Was this page helpful?” but kindly provide additional information to help us improve the article.

Before you run, why not browse our Technology how-to guides page for more exciting hands-on how-to guides?

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend