How to connect to linux from windows

Xrdp — Connect Ubuntu Linux Remote Desktop via RDP from Windows

How often do you access Linux Desktop? What tools do you use to access remote desktop?

Xrdp is an open source tool which allows users to access the Linux remote desktop via Windows RDP. Apart from Windows RDP, xrdp tool also accepts connections from other RDP clients like FreeRDP, rdesktop and NeutrinoRDP. Xrdp is now supporting TLS security layer.

Xrdp Requirement

  • xrdp and xorgxrdp packages
  • Listens on 3389/tcp. Make sure your firewall accepts connections

In this article, I will show how you can remotely connect to Ubuntu Desktop from a Windows machine using Xrdp tool.

1) Installation on Linux

on Ubuntu 18.04

First, you need to install Xrdp on Ubuntu

You have to configure the polkit rule to avoid an authenticate popup after inputting the username and password at the xrdp login screen on windows

restart the xrdp service

Then make sure that the service is running

Now make sure to automatically start the service at the system startup

Now you will need to check your ip address because you will need it for the connection

My ip address is 172.16.8.177 . So keeps yours it in your mind.

Xrdp works with port 3389 so make sure to open it. UFW is disabled by default so you will need to enable the firewall and create a rule for xrdp

Now you can continue the configuration on windows side

On Centos/Redhat 7

Make sure to install the Epel repositories before

Now install xrdp packages

Add a rule in the firewall. On Centos/RedHat is not ufw but firewalld to configure

Then reload the firewall

Now enable and restart the xrdp service

Check your ip address for the remote connection on Windows

2) Connect from Windows

On your windows machine such as windows 10 in our case, launch the default remote desktop connection tool.

You will need to enter the ip address of your machine and you will be asked to enter the username

Access Remote desktop of Ubuntu/CentOS

Enter the ip address and the username

Now confirm the information and launch the connection. If you are not logged out in local, the remote login would fail.

Now you will be asked for your password

Now confirm your credentials. You can see the IP address of my Ubuntu on the top and the login page. Enter your password and enjoy

Are you aware of any other tools? Please advise us on the comments

How to connect to linux from windows

Updated: December 22, 2008

A friend of mine asked me how to do this, so I decided to write a tutorial.В If you’re using both Windows and Linux on several computers, a need might arise for you to connect to the Linux machine now and then. Your Linux machine might serve many purposes: it could be a server, a media center (like MythTV), a backup storage area, or just another desktop. You may want to connect to this machine — or even control it. Well, for sharing, we have Samba.

Configuring Samba is very easy. I have demonstrated this in several articles. You can find detailed step-by-step instructions in the reading section below. Now, for remote control, we have this tutorial. Let’s see how we can configure our Linux box to be remotely controlled from Windows.

Читайте также:  Драйвера canon mg2540s для linux

I will demonstrate how to take control over a Linux machine using SSH and VNC. SSH stands for Secure SHell , a network protocol that allows you to exchange data between two connected network devices using an encrypted tunnel. The tunnel is not limited to just transferring data. You can use it to control the machine on the other end, forward insecure applications through the tunnel and more. VNC stands for Virtual Network Computing , a desktop sharing system that allows you to control other machines.

Prerequisites

Before we begin, I would like to point out that the purpose of this tutorial is to demonstrate how remote connectivity and control can be achieved. It is not a comprehensive security guide into the pitfalls and dangers of opening a port to remote connections and the integrity of transmitted information. This tutorial assumes a safe network where both ends strive toward a mutual goal.

If you plan to deploy a setup like this over the Internet, you must be aware that there could be people who might try to break into your system and take control over it. Or they might want to sniff sensitive data you exchange using these protocols.

A local area network (LAN) setup behind a firewall is one thing. A world-wide open setup is something else entirely.

At the very minimum, the use of SSH or VNC over the Internet will require the use of firewalls with logging enabled, mandatory encryption with long and frequently rotated keys and strong passwords, non-standard ports, a limit on the number of unsuccessful attempts, a time limit between failed logins, no root access, and possibly even other security precautions.

In our setup, we will talk about a cozy LAN at your home or an office, far from the dangers of the Internet. So, now that we know what we’re about to do, let us begin, VNC first.

We will demonstrate using Ubuntu (8.10). Ubuntu comes with the VNC software already installed. You only have to configure it for remote access. Furthermore, Ubuntu makes things simple by using no firewall in its default configuration, since it comes with no open ports — and thus, the use of a firewall is unnecessary.

Ubuntu uses the Vino program for VNC connectivity. You can power Vino by going to System > Preferences > Remote Desktop .В This will open the configuration menu for Vino.

Now, we need to check several boxes: Allow other users to view your desktop and Allow other users to control your desktop . We also want security, so we will require a password and a confirmation.

Under Advanced , we can further configure the connection. Encryption is strongly encouraged. You may also want to consider a non-standard port.

Check that your VNC port is open now. You can use nmap to do that. It’s included in most distributions or can be easily downloaded from repositories.

Now, we need to configure the Windows machine. We require a VNC program to connect to our Linux box. Therefore, download a VNC program and install it. There are many choices, but your easiest best is either RealVNC or TightVNC.В Once you launch the program, specify the address of the remote machine:

P.S. Please note that your choices may differ. It depends how you wish to configure your software. In this case, I made no adjustments and just fired up the program with the default options set.В On the Ubuntu machine, you’ll be asked to confirm the connection attempt:

Читайте также:  Ram диск для windows server 2012

And here we have a Linux box controlled by a Windows machine:

Job done. Easy peasy.

This time, we need to install the ssh package in Ubuntu. Some distributions will have it installed, others will have it in the repositories. Once it is installed, either via Synaptic or the apt-get (on the command line, sudo apt-get install ssh ), check that the SSH port is open:

The default port is 22.

Now, in Windows, install an ssh client software. A good choice is PuTTY. It is simple, lightweight and will also run from removable media like USB drives.

PuTTY is a command line tool. Open the command line (Run > cmd), navigate to the PuTTY folder and run PuTTY against the remote IP address, something like:

You’ll be asked to import the key of the remote machine. This is a security precaution, so that you really know you’re connecting to the computer you want.

Authenticate with the password:

And you’re logged in:

Now start working:

More reading

And a few more links you might like:

Conclusion

The task of establishing a remote connection with Linux machines is a very simple thing. The entire procedure should take you less than 5 minutes. Of course, if you’re trying to achieve this in an insecure environment, you should take many necessary steps to make sure that both your Linux machine, your client and all the information you’re about to exchange are safe from intrusion, snooping or other potential dangers. This means strong encryption, non-trivial passwords and several other tricks.

In your home environment, where the task is so much simpler, there are simple and easy-to-use tools for the job. If your Linux machine serves a file or printing server, a media center or is simply located beyond the reach of your lazy fingers, gaining control over it takes very little effort.

In the case of ssh, you may also want to use remote connectivity if you’re short of another monitor or just to practice Linux command line.В Either way, it’s simple — and fun.

How to connect to Ubuntu from Windows

Dec 29, 2019
Comment

Do you need to access a remote Ubuntu PC or Server from your Microsoft Windows PC? Unsure about how to do it? Follow along with this guide as we show you how to connect to Ubuntu from Windows!

Note: this guide covers Windows 10. If you are not using Windows 10, the instructions below may not work.

Connect to Ubuntu from Windows over the command-line

If you’re trying to connect to Ubuntu to access the command-line from Microsoft Windows, your best bet is to use SSH. Why? At this point, SSH is a universal protocol, and every operating system, from Linux to Windows, and even Mac OS have native support for it.

In the past, in Microsoft Windows, if you wanted to access your Ubuntu operating system, you needed to install a third-party SSH tool like Putty. Well, thanks to changes in Windows 10, you can now do it by launching Windows Powershell.

To connect to your Ubuntu computer from Windows over the command-line, follow the step-by-step instructions below.

Step 1: Head over to the Ubuntu PC or Ubuntu Server, and launch a terminal window. Then, with the terminal window open, update the system.

Step 2: After updating the system, use the apt install command below to install the OpenSSH server, which will automatically set up SSH on Ubuntu.

Читайте также:  Обновление всех приложений linux

Having issues with OpenSSH Server? Follow our guide on how to set it up.

Step 3: After setting up OpenSSH server on your Ubuntu system, leave it be and go to the Windows PC.

Step 4: On the Windows PC, launch the PowerShell terminal. Unsure on how to start the Powershell terminal window? Do the following.

First, press the Win key on the keyboard to bring open the search box. Then, type in “PowerShell.” Look through the search results and launch PowerShell.

Step 5: Click on the PowerShell prompt with the mouse, and type in the Ubuntu PC’s username. Then, after the username, add an @ symbol, and the Ubuntu computer’s hostname. Or, if you don’t want to use the hostname, use the computer’s IP address. The command should look like the example below.

Step 6: After writing in the SSH command in PowerShell, press the Enter key on the keyboard to initiate an outbound connection to the remote Ubuntu PC.

Step 7: Once you’ve successfully made a connection to the Ubuntu PC for the first time, you will see a message in the PowerShell terminal prompt. It states that you must accept the SSH connection, trust it, and add it to your known hosts. Do so.

Assuming the SSH connection to the Ubuntu PC is successful, you will now have full command-line access to your remote Ubuntu PC from Microsoft PowerShell. Feel free to use the terminal as if you were sitting right in front of it.

Need to exit the SSH session? Type in the exit command.

Connect to Ubuntu from Windows via GUI

You may need to access the file system of your remote Ubuntu PC via the Windows Explorer UI. FTP is the easiest way to remotely access the Ubuntu PC’s files from the Windows Explorer UI, as FTP is easily integrated within windows.

Note: you must set up an FTP server on your remote Ubuntu PC or Server. Please follow this guide here to learn how to get it set up.

To access your Ubuntu PC’s files on Windows through the Explorer UI, do the following.

Step 1: Open up Windows Explorer.

Step 2: Look to the sidebar in Windows Explorer for “This PC” and click on it with the mouse.

Step 3: Inside “This PC,” select “Add a network location” in the top bar.

Step 4: Go through the network wizard, till you get to, “Where do you want to create this network location?” Then, select “Choose a custom network location” and select “Next.”

Step 5: In the location box, type in ftp:// followed by the hostname (or IP address) of the remote Ubuntu PC.

Step 6: Click through to add the FTP server attached to the system.

Step 7: After adding the FTP server as a network location, you will see the remote FTP server location available in “This PC” under the “Network locations” section — double-click on the network location to access the Ubuntu PC’s files remotely.

Access FTP without adding a network location

You may want to access the Ubuntu PC’s files without adding a network location. Follow the step-by-step instructions below.

Step 1: Open up File Explorer, and click on the address bar with the mouse.

Step 2: Clear the location data from the address bar with the Backspace button.

Step 3: Write in the FTP server address in the address bar. It should look like the example below.

Step 4: Press the Enter key on the keyboard to access the FTP server.

Оцените статью