How To Access Another Computer Through IP Address In CMD?

0 rating based on 0 reviews

Are you a Windows user looking to remote into another computer using Command Prompt? Hopefully, by the end of this article, you will know how to do so. There are two ways to access another computer. One allows you to connect a cmd session via SSH and the other uses telnet. The process is fairly straightforward when using telnet, since it's essentially point and click. However there is more information for those interested in learning about SSH. Accessing a computer remotely via IP address lets you connect and log in remotely if the computer has Remote Desktop enabled in Windows or installed on Linux or Mac. It's a quick connection method, though that doesn't mean it's secure. I suggest having an encrypted connection when connecting remotely, if possible.

Access Another Computer through IP Address in CMD

Sometimes you may have to connect to another computer for work purposes. Or you may be away from home and need to connect to your computer remotely. There are software or tools like “Team Viewer” or “Anydesk” that you can use for this purpose. These require another person to operate the other computer if you want to connect.

But the “Windows Remote Desktop Connection” feature can be used with the command prompt (cmd), without any assistance from any other person, connect to another computer. 

But the computer has to be turned on. Keeping it on sleep mode or hibernate mode won’t work. Follow the steps below to use the IP of a computer in CMD to access that computer.

Enabling the Remote Desktop Connection in Windows

Before you use CMD to access another computer, you need to enable or set up a remote desktop connection to the computer you want to access. To enable this, follow these steps:

  1. Open the “Settings” of Windows.
  2. Go to the “Update & Security” settings.
  3. Open the update and security settingsOpen the “For Developers” tab.
  4. Move down to the segment called “Remote Desktop”.
  5. Click on “Show settings” beside the “Change settings to allow …” option.
    show settings option
  6. Choose “Allow remote connections ….”.
  7. Now click on “Select User”.
  8. Click on the “Add” button on the new pop-up window.
  9. Now enter the “User Name(s)” you want to allow access to.
  10. Click “Ok” to close the boxes.
  11. Finally, Click on “Apply” and then “Ok”.

Alternatively, you can do this

  1. From the Settings menu, go to “System” settings instead of “Update & Security”.
  2. Scroll down the left panel and open “Remote Desktop”.
  3. Click the button for “Enable Remote Desktop”.
  4. Click on “Confirm” on the pop-up dialogue box to enable remote desktop.
  5. Now click on “Select users that can ….”.
    Enable remote desktop and adding users
  6. Follow the above steps here as well to allow access to your required users.

Using CMD for Accessing Another Computer

After enabling remote desktop access to the computer you want to connect to, you can now use your computer’s command prompt to connect to that computer. For this:

  1. At the same time, press on Windows key plus “R” to launch “run”.
  2. In the field, type “cmd” and click on “Ok” while holding down the “Shift + CTRL” buttons on your keyboard. Administrator mode for the command prompt will be launched by doing this.
  3. You can also use the search tool in “Windows 10” to search for the command prompt and then run it as administrator from there.
  4. In the command window, type and enter “mstsc /console /v:”.
    connect to another computer with IP
  5. Here “” is the computer’s IP address that you are about to connect to.


  • If you don’t know the computer’s IP address, google “What’s my IP” on that computer, and it will show you.
  • You can also launch the command prompt on that computer and enter “ipconfig” to view the IP address.
  • It is better to connect with a static IP rather than a dynamic one. That way, you can stay connected to the computer without any interruption.

Summary: Access to Another Computer through IP Address in CMD

  • Create a new Nmap Script.
  • Open the Nmap Scripting Folder.
  • Open the SSH Scripts folder.
  • Create a file in SSH script folder with your text editor.
  • Write the code for the user interface.
  • Write the script that will run on the target machine.
  • Save the file as command-executor.nse and test it out.
  • Now you can access to another computer through IP address in CMD.