Connect to ubuntu server from windows

Need to remote access your Ubuntu PC from another location? Here's how to remote desktop into Ubuntu from Windows.

You’re in one room, sitting at a PC; the data you want is in another, on a computer running Ubuntu. If both computers are in the same house, no problem, but what if they’re in different offices? It might be a bit of a walk!

The answer, therefore, is setting up a remote desktop connection. Learn how to set up a remote desktop from Windows to Ubuntu.

Why Remote Connect to Ubuntu From Windows?

There are several reasons why you might want to remote connect to your Ubuntu computer. Perhaps you’re at work and need to log into your home computer. Alternatively, you might have an Ubuntu PC in one room and your Windows PC in another. Maybe you want to run updates on Ubuntu or access files.

Remote control Ubuntu using RDP

Alternatively, you might be running an Ubuntu server for data, a website, or even a game. Either way, a method of setting up a remote connection will save a lot of time and effort.

You have three key options for establishing a remote connection with an Ubuntu machine running the default desktop environment:

  1. Remote Desktop (RDP)
  2. Virtual Network Computing (VNC)
  3. Third-party remote desktop software

First, however, you need to make some preparations:

  1. Enable port forwarding on the remote device’s router
  2. Find the IP address
  3. Install SSH

Let’s look at these in turn.

Prepare Windows RDP to Ubuntu Connections

Remote access solutions are simple to set up and manage across the same network. However, if you’re working from home, this instantly complicates things.

To use VNC and RDP with a PC on a different network, you’ll need to enable access to the remote computer via its router. You can do so by using «port forwarding.» However, you’ll need the IP address before you set this up.

Find Your Ubuntu PC’s IP Address

Before you can establish remote access to your Ubuntu device from Windows over RDP or VNC, you’ll need the IP address.

The first way is the easiest. Physically go to the Ubuntu machine, press Ctrl + Alt + T to open the Terminal, and input the command:

 ifconfig 

Look for the «inet addr» against the connection you’re currently using. For instance, if you’re on Wi-Fi, look for wlan0. If the computer is connected to the network via Ethernet, look for eth0.

Another way to find the IP address is to find the network connection icon in the panel, right-click, and select Connection Information. You’ll find the IP address listed here.

Is neither of these options open? You can also connect to your router directly via your computer’s browser.

Once signed into the router’s admin console, you’ll be able to see which devices are connected. Just look for your Ubuntu device name, find the IP address, and make a note of it for later.

Enable Port Forwarding

To access a computer on another network (e.g., your work network), you need to enable port forwarding on the router where your Ubuntu PC is located.

Start by establishing the IP address of the router. You can use the ip r command for this, with grep to specify the default:

 ip r | grep default 

Make a note of the IP address, then open it in your browser to display the router’s admin console. Enabling port forwarding is simple:

  • Look for the Port Forwarding settings
  • Create a New Rule labeled Remote Desktop
  • Set the Internal Port number to 3389
  • Set the External Port number to 3389
  • Input the IP address of the Ubuntu PC
  • Click Save

Note that these steps are generic and will differ depending on your router. For detailed steps, check your router documentation.

Once saved, you should be able to RDP into the Ubuntu PC remotely via your organization’s static IP address. If your employer does not use a static IP (unlikely, but it happens), use a dynamic DNS provider instead.

Your organization’s system admin can set up port forwarding if you’re not using commercial remote desktop tools.

Set Up Access Using SSH

To save time, you might want to install PuTTY on your PC (or just try the built-in Windows SSH function). It enables you to set up an SSH connection, which gives remote access to the Ubuntu command line.

To be clear: this isn’t a remote desktop option; there is no mouse control. But it is helpful to install the tools you’ll be using remotely. SSH is often disabled by default, however, so if it is not installed, you’ll need to fix it.

In short, it depends on which Ubuntu version you’re using and whether you’ve used SSH previously.

Once installed via the terminal (sudo apt install openssh-server), you’ll be able to make a remote connection to the Ubuntu desktop. Simply enter the IP address and the Ubuntu username and password. You can then use the terminal to install the tools you need for RDP and VNC.

1. Remote Access Using Remote Desktop Protocol

The easiest option is to use Remote Desktop Protocol or RDP. Built into Windows, this tool can establish a remote desktop connection across your home network. All you need is the IP address of the Ubuntu device to establish a remote desktop connection to Ubuntu from Windows.

While the necessary software is pre-installed on Windows, you’ll need to install the xrdp tool on Ubuntu. To do this, open a terminal (Ctrl + Alt + T) and enter:

 sudo apt install xrdp 

Follow this with:

 sudo systemctl enable xrdp 

Wait for this to install, then run the Remote Desktop application in Windows using the Start Menu or Search. Type rdp, then click on Remote Desktop Connection. With the app open, input the IP address in the Computer field.

Remote connect to Linux with RDP

Next, click Show Options and add the Username for the Ubuntu PC. You can click Save to keep these settings for reuse on another occasion.

Click Connect to start the connection and input the Ubuntu account password when prompted. The connection will then be established, giving you full mouse and keyboard access to your remote Ubuntu computer. If you plan to use this connection often, you can create a configuration file to save time.

Troubleshooting RDP to Ubuntu

While RDP is an excellent option for remote connecting to your Ubuntu PC, it’s unreliable on some Ubuntu versions, like 18.04 LTS. There appears to be an issue establishing a remote connection while already logged into the same account on Ubuntu.

As such, the simple way around this is to log out of the Ubuntu computer.

If this isn’t possible, try switching the RDP connection from the Xorg server to X11rdp. Wait for that to fail, then try Xorg again.

You might also attempt a connection after restarting the Linux machine.

Ubuntu 22.04 LTS should include a fix to make RDP to Ubuntu smoother.

2. Connect to Ubuntu From Windows With VNC

Another option with full remote desktop functionality is VNC (Virtual Network Computing). It requires a client application on the Windows PC and a server on Ubuntu.

On the remote PC, install the TightVNC Server component after checking for updates:

 sudo apt update 

Then install the server utility:

 sudo apt install tightvncserver 

You’ll then need to run it:

 sudo tightvncserver 

At this point, you’ll be prompted to set a password for the connection. Make a note of the desktop number, usually :1.

Now that TightVNC Server is set up on Ubuntu, you’ll need to install the client on Windows. You can download it from the official website—make sure you choose the correct version, as it is available in 32-bit and 64-bit flavors.

Download: TightVNC

TightVNC tools are only available as a bundle, so once installed, look for TightVNC Viewer in Windows search.

Once you’ve launched the viewer, input the IP address of the Ubuntu box in Remote Host, followed by the desktop number. So, it might look like this:

 192.168.0.99:1 
Remote desktop from Windows to Linux with VNC

Input the password when prompted and commence your remote desktop activity!

Making TightVNC More Secure

By default, TightVNC will encrypt your password but nothing else. It makes it insecure to connect over the internet. Fortunately, you can enhance security with SSH and Xming.

Download and install the Xming tool for Windows from SourceForge to use this. Once this is done, look for the desktop shortcut, right-click, and choose Properties.

Look for the Shortcut tab, and in the Target field, enter the following:

 "C:Program Files (x86)XmingXming.exe" :0 -clipboard -multiwindow 

Click Apply to save the change, then OK. Double-click the icon to run Xming, then open PuTTY. Here, expand the menu on the left to Connection > SSH > X11.

Check Enable X11 Forwarding, then return to Session at the top of the menu.

Enable X11 forwarding to use remote desktop with SSH

Enter the IP address for the remote device and click Open. Moments later, a secure connection to the remote Ubuntu desktop will be available.

Everything you’ve learned so far is standard if you need to access a Linux PC on your local network remotely. If you need to go beyond that, the steps to enable port forwarding will help.

But what if you have no intention of accessing your router? If this seems too complicated, third-party commercial software designed to facilitate remote desktops is required. Several are available, but not all support Linux.

We suggest you try out:

  • NoMachine: Initially released as a Linux remote desktop tool, this is now available across all major platforms. Install on the target computer, then on your local machine, and set up a remote connection.
  • Chrome Remote Desktop: Uses your Google account to manage remote access via the Chrome browser.
  • TeamViewer: A well-known commercial remote desktop solution. Simply install the client and host software beforehand. It also provides a host app for remotely accessing Raspberry Pi devices.

These tools require setting up before use. If you have a colleague near the remote PC, they might be able to help. See our list of remote access tools for more suggestions.

Choosing the Right Ubuntu Remote Desktop Solution

Which remote desktop tool for connections between Ubuntu and Windows should you use?

Three main options are available:

  • RDP: Uses the Windows Remote Desktop Protocol via the open-source xrdp implementation.
  • VNC: Virtual Network Computing is an alternative to RDP but less secure.
  • Commercial remote software: Most of these require minimal setup and support Linux.

You can also use SSH to issue remote instructions to your Ubuntu PC.

We’ve shown you three ways to establish a remote connection to your Ubuntu computer or server from Windows. Each has its advantages and disadvantages. But if you just want to dip into Ubuntu, try the Windows Subsystem for Linux on Windows 10.

MobaXterm

http://mobaxterm.mobatek.net/

Freeware implementation the X server on Windows.

This method qequires minimal setup, and is very reliable.

You must first install the SSH server on Ubuntu e.g. by physically accessing a keyboard on the machine:

sudo apt install openssh-server

Then, on Windows within MobaXterm, you go:

  • Sessions
  • New session
  • SSH

which gives you an SSH shell.

Now, if you start a program from that shell, e.g.:

sudo apt install x11-apps
xeyes

xeyes opens as a separate native Windows window.

One annoyance is that if you opened the window at work, and then you get home, you have to start a new instance of the app, and you can’t see the already opened window. This is made further annoying by applications that work in single window mode, e.g. browsers: you will have to search for how to force a new instance, and then you will have two instances running.

Tested in Windows 10 and Ubuntu 19.10 on a local network with MobaXterm v12.4:

  • xeyes 7.7: move pretty fast, but you have to be hovering the window itself
  • Firefox 74.0: page scrolls were pretty sluggish nearing unsability, I would not be a happy user
  • Eclipse 2020-03: works surprisingly well, I can see a bit of lag, but pretty small, even when scrolling, and trying to watch a video on YouTube makes it unresponsive
  • Chromium 79: can’t open it, error message: «MoTTY X11 proxy: Unsupported authorisation protocol» asked at: https://superuser.com/questions/1111900/how-to-fix-mobaxterm-x11-proxy-unsupported-authorisation-protocol

Here is a Windows screenshot showing MobaXterm running on top left, and two program (xeyes and firefox) running on the Ubuntu remote but showing as separate native Windows windows!

enter image description here

MobaXterm X server alternatives

I haven’t tried those yet, but behavior should be similar to MoabXterm? Hopefully we can find a good open source one then:

  • Cygwin/X https://x.cygwin.com/ demo video: https://youtu.be/ENkOEknSLv4?t=105
  • Xephyr: https://en.wikipedia.org/wiki/Xephyr MIT licensed. I can’t find out how to download a prebuilt in 5 minutes.
  • Xming: https://en.wikipedia.org/wiki/Xming another proprietary one

xrdp

Mentioned at: https://askubuntu.com/a/592544/52975

I just want to confirm that it does not work without touching some configuration files as mentioned in that answer from Windows 10 into Ubuntu 19.10, you just get a black screen in that case: Blank desktop when logging in via xrdp

Also RDP is a proprietary Microsoft protocol which is saddening: https://en.wikipedia.org/wiki/Remote_Desktop_Protocol But it does appear to send only minimal information unlike VNC which sends images: https://superuser.com/questions/32495/whats-the-difference-between-rdp-vs-vnc

VNC

I’ve tried the following programs, but they were sending the desktop as video, which incurred unacceptable screen resolution loss / mouse inaccuracy / network bandwidth if you are offsite.

Servers (run on Ubuntu):

  • Vino. Ships pre-installed, but there are compatibility issues with some available Windows clients: Gnome 3.10 sharing desktop — how to configure the security type for VNC?

Clients (run on Windows):

  • TigerVNC

PuTTY

https://www.chiark.greenend.org.uk/~sgtatham/putty/

The go-to solution if all you want is a text terminal via SSH.

First you have to install PuTTY on Windows, usually by downloading it from its website.

On Ubuntu, install the SSH server:

sudo apt install openssh-server

and then you just open PuTTY, tell it the Ubuntu IP and connect via SSH, and that gives you a terminal inside Ubuntu.

PuTTY is very convenient as it integrates both an xterm emulator and SSH / telnet and other protocols in a single package.

Then you also want to install and use tmux on Ubuntu and use tmux attach when connecting from Windows from within PuTTY as mentioned at https://unix.stackexchange.com/questions/22781/how-to-recover-a-shell-after-a-disconnection, this way you can:

  • use the exact same terminals on work and at home. Yes, terminal windows get updated in real time on both machines if you type anything in either! The magic of servers!
  • not lose any sessions if the connection breaks

which is amazing!!! There are however some annoying glitches with environment variables, particularly DISPLAY: https://unix.stackexchange.com/questions/75681/why-do-i-have-to-re-set-env-vars-in-tmux-when-i-re-attach

You will also want to reduce the default huge default font size: Increase font size of putty

How to copy paste in PuTTY: https://superuser.com/questions/180043/how-do-i-paste-the-windows-clipboard-into-my-putty-session-using-only-the-keybo

Then, you can just open webpages you need directly on the native Windows browser. If all you need to get your work done is Vim and and a browser, PuTTY is definitely the way to go. The only thing I miss on my development day-to-day with this setup is Eclipse.

SSH which is a Secure shell protocol allows the users to connect the Unix and Linux based operating systems running on servers or desktops remotely. We can run all commands on remote servers like Ubuntu, Debian, Centos, RedHat etc. using the lightweight piece of SSH software. To know more about it see our article: What is SSH (Secure Shell)?

Well, running SSH on Linux using SSH server to connect and login some other Linux system is pretty easy but how to do it between Ubuntu (Linux) and Windows 10/8/7.  In this article, we focus on this and let you know the simple way to SSH into Ubuntu from Windows 10.

Note: This method will be the same for Ubuntu 18.04,170.4, 16.04, 14,04… to log in using Windows 7, Windows 8 or Windows 10.

Step 1: OpenSSH-server on Ubuntu Linux machine

To connect & login the Ubuntu using the SSH first of all we need to install the same on Ubuntu. For this purpose use the command:

sudo apt-get install ssh

Step 2: Enable the SSH server service

After installing the SSH server, enable it on Ubuntu by using the command:

sudo service ssh start

Step 3: Check the SSH status

Once you enabled the SSH service, its time to check whether it is running in the background or not. Use this command:

sudo service ssh status

If you output for above command is * sshd is running then everything is fine and move to the next step.


Step 4: Download the Putty on Windows 10/9/7

To connect or log in the Ubuntu via SSH, we need an SSH client for Windows. The Putty is a free and easy way to login Ubuntu and other Linux servers remotely from Windows using SSH. However, there are numbers of other free SSH clients available online those ones can be used too.  Here is the Putty Download Link. 


Step 5: Install Putty SSH client on Windows

We can install the Putty.exe downloaded file just like any other software with few clicks. There is no special configuration or setup. Double click on it and follow the guided steps.


Step 6: Run and configure Putty

As we open the Putty, the first screen will be something like shown in the below screen.  Now in the Host Name (or IP address) box type the Ip address of the remote Ubuntu server which you want to connect using the SSH protocol.

After adding the right IP address just click on the Open button.

connect SSH Ubuntu windows 10


Step 7: Login to Ubuntu server via Putty SSH client

As we click on the Open button, the putty will ask whether you trust the server you about to connect or not, click on YES button.

putty ssh key

The black colour command terminal window of the Putty will appear along with login as: text.  Enter the username and password of the remote server you want to login. That’s it.

login into putty SSH ubutnu windows 10

You can also use the command prompt to use the SSH after installing the Putty. Go to Command prompt or PowerShell on Windows 10 and type: putty [ipaddres] and hit the enter button.

For example– putty 192.168.43.94

open putty SSH via command prompt

In this way, we can connect and login remote Ubuntu server or any other Linux or Unix machine over SSH from Windows 10/8/7.

Other Resources to read:

  • In Ubuntu enable ssh to connect and manage the server remotely
  • How to install Overgrive on Ubuntu – A Google drive desktop client solution for Linux
  • How to Install Ubuntu Minimal Server 18.04 “Bionic Beaver”: Just 64 MB
  • How to install & use the Google Backup and Sync on Ubuntu

This beginner’s guide helps you remotely connect to Ubuntu from Windows. We show you the easy steps with an example.

If you work in a networked environment at your work or set up a small network at home (wired or wireless), you are often required to remotely connect to your Ubuntu machine (or any Linux machine).

The following steps ideally should work for any Linux distribution which supports Xrdp for remote connection. We have tested it in Ubuntu 22.04 with Windows 11 & 10 and it works fine.

In theory, there are many ways of connecting to any system over the network (internet or intranet). You can use any RDP client, such as Remmina (which is an excellent client), to connect via VNC and RDP protocol. Moreover, you can even connect via ssh with X forwarding as well. You can also check out the list of RDP clients if you want something specific.

In this basic guide, I have used the Xrdp, a free and open-source utility server for Microsoft RDP protocol available in Windows.

Connect to Ubuntu from Windows via remote desktop

Step 1: Install xrdp in Ubuntu

The following steps do not require any installation or configuration in Windows. Although, you must have enough privileges to run the Microsoft RDP client (mstsc).

In Ubuntu 22.04 (or any Ubuntu version or other similar distributions), install the Xrdp via the terminal using the below commands.

sudo apt install xrdp

If you are using Fedora – use the command below.

sudo dnf install xrdp

And for Arch, use –

pacman -S xrdp

This should install the xrdp server in your Linux system.

Step 2: Enable xrdp service

The next step is to enable the xrdp service. The service must always be running to listen to incoming remote desktop requests. So to do that, run the below command in Ubuntu (and other systemd-based Linux distributions).

systemctl enable xrdp

This systemctl command enables your system to start the service immediately and ensure that it runs automatically the next time you boot.

enable xrdp
enable xrdp

You might want to check whether the service is running via the below command:

systemctl status xrdp

Also, open the Ubuntu settings and Enable Sharing and Enable Screen Sharing. Follow the below screenshots.

Enable sharing in settings
Enable sharing in settings
Enable sharing in settings
Enable sharing in settings

Step 3: Connect to Ubuntu

Open the Windows Start menu and type Remote to open the remote connection dialog. You can also press CTRL+R and type mstsc to open the following dialog.

Start Remote connection from Windows
Start Remote connection from Windows

On the above window, give the IP address of the target Ubuntu system (where the xrdp server is running). You can get the IP address from the Settings -> Wifi or Network Section.

Alternatively, you can run ifconfig or ip a to get the IPV4 address of the system.

ifconfig

Or –

ip a

Finally, click connect. You should see the below Xrdp prompt.

xrdp prompt
xrdp prompt

Choose the session as xrdp or xvnc. Give the username and password of the Ubuntu system and press OK.

You should be connected to the Ubuntu system.

Ubuntu 20.04 Connected from Windows 10
Ubuntu Connected from Windows

Usage notes and troubleshooting

  • Slow rdp session

The response of the remote session is dependent on your network speed. So you might feel a little bit of slowness on actions (click, scroll, etc.) on the desktop.

  • Blank screen on rdp session

Ensure the user has logged off from the target Ubuntu session – which you use for remote connection. If the user logged on and you are connecting – you might see a blank screen (or black screen) in Windows rdp session. This has happened on my test, and I am yet to find out why.

  • No customization in rdp session

Ideally, when you log on, a default Xorg profile will be created for the same user. That means you might not see any customizations done by the user. A basic GNOME Shell with all options will be available.

  • Repeated Authentication Required popup
Authentication Prompt
Authentication Prompt

There is a chance that you may see multiple popups (like above) asking for a username and password. The main reason is the implementation of Polkit (a component for controlling system-wide privileges) within Ubuntu. When you log in, Polkit rules check whether the user has certain privileges to perform actions (active or passive). The Polkit rules are more restrictive when connecting via RDP. Hence the popup for Authentication. Fixing this requires a complex Polkit rule setup for the remote RDP users. I am still testing this and am not quite able to fix it.

Wrapping Up

I hope this guide helps you to set up basic RDP from Windows 10 to Ubuntu 20.04. This guide does not require any additional software installation in Windows 10.

This tutorial is going to show you 3 ways to log into Linux server on Windows via SSH.

What’s SSH?

SSH stands for Secure Shell, which was invented in 1995 to replace the insecure Telnet (Telecommunication Network). It’s now the primary way for system administrators to securely log into remote Linux servers over the public Internet. Although it looks and acts the same as Telnet, all communications over the SSH protocol is encrypted to prevent packet sniffing.

If you are running a Linux or Mac computer, SSH client is installed by default. You can open up a terminal window and run the ssh command like below to connect to a remote Linux server.

ssh [email protected]

Now let’s discuss how to use SSH on Windows.

Method 1: Windows 10’s Built-in SSH Client

The Microsoft PowerShell team decided to port OpenSSH (both the client and the server) to Windows in 2015. It finally arrived in Windows 10’s Fall Creator Update in 2017 and is enabled by default in the April 2018 Update.

To use the OpenSSH client on Windows 10, simply open a PowerShell window or a command prompt window and run the ssh command.  For example, if I want to connect to my Ubuntu desktop in the LAN, I would run

ssh [email protected]

linuxbabe is the username on my Ubuntu desktop and 192.168.0.101 is the private IP address for my Ubuntu desktop. The first time you connect to a Linux computer, you will be prompted to accept the host key. Then enter your password to login. After login, you can run Linux commands to do administrative tasks.

Note that if you want to paste a password into the PowerShell window, you need to right-click the mouse and press Enter.

ssh windows

To log out from the Linux box, run the exit command or press Ctrl+D.

The default font size in PowerShell Window is very small. To change it, right-click the titlebar and select properties, then you can change the font size, and the background color.

windows powershell change font size and background

Method 2: Use SSH in Windows Subsystem for Linux

Windows Subsystem for Linux (WSL) enables you to run native Linux command-line tools directly on Windows 10. If you are a system administrator, WSL is probably an overkill for just using SSH because it would install and run a Linux distro (without graphical user interface) on your Windows 10 desktop. WSL is created for web developers or those who need to work on open-source projects. You can use not only SSH but also other Linux command line tools (Bash, sed, awk, etc).

Open the Microsoft Store and enter WSL in the search box. Select Run Linux on Windows and install a Linux distro of your choice.

wsl windows subsystem for linux

For example, I choose Ubuntu and click the Get button to install it.

ubuntu windows subsystem for linux

Once your Linux distro is installed, open the Control Panel and select Programs -> Turn Windows features on or off. Tick on the checkbox of Windows Subsystem for Linux to enable this feature. (You may need to reboot your Windows PC for this change to take effect.)

Next, you can launch the Linux distro from the start menu by search the distro’s name. The first time you launch it, you need to create a user and set a password.

ssh windows 10

After that, you can use the ssh command like below to connect to a Linux server or PC that runs a SSH server.

ssh [email protected]

Method 3: Use Putty

Putty is a well-known and the most popular SSH client on Windows before the arrival of Windows OpenSSH client and Windows Subsystem for Linux. To use SSH with Putty, you need to download the Putty program from the official website and install it.

Launch Putty from the Start menu. Then enter the IP address or hostname of the Linux box and click the Open button to connect to it.

ssh windows command line

Accept the host key and you will be prompted to enter the username and password.

ssh windows 10 command line

Please note that when you type in your password, the cursor doesn’t move, but it’s actually accepting your password.  To paste text into Putty, first press Ctrl+C to copy the text, then go to Putty window and press the right button of your mouse.

How to Set Up SSH Key on Windows 10 (Optional)

There’re mainly two ways of authenticating user login with OpenSSH server:

  • password authentication
  • public-key authentication: also known as passwordless SSH login because you don’t need to enter your password.

To set up public-key authentication on Windows 10, follow the instructions below.

Open Windows Powershell, and run the following command to generate SSH keypair.

ssh-keygen -t rsa -b 4096

Where:

  • -t stands for type. The above command generates an RSA type keypair. RSA is the default type.
  • -b stands for bits. By default, the key is 3072 bits long. We use a 4096 bits key for stronger security.

When asked which file to save the key, you can simply press Enter to use the default file. Next, you can enter a passphrase to encrypt the private key, but you will need to enter this passphrase every time when you log into the Linux server. If you don’t want it, you can press Enter, so it will have no passphrase.

ssh key windows

  • The private key (your identification) will be saved in the .ssh/id_rsa file under your user directory.
  • The public key will be saved in the .ssh/id_rsa.pub file.

Now we need to upload the public key to remote Linux server. You can display the public key in the Powershell with the following command.

cat .ssh/id_rsa.pub

Then log in to your server via password authentication, and run the following command to create a .ssh directory under your home directory.

sudo mkdir ~/.ssh

Create the authorized_hosts file

sudo nano ~/.ssh/authorized_keys

Copy your SSH public key and paste it to this file. Save and close the file. To save a file in Nano text editor, press Ctrl+O, then press Enter to confirm. To close a file, press Ctrl+X.

Next, change the permission of this file.

sudo chmod 600 ~/.ssh/authorized_keys

Log out of your Linux server.

exit

Now you can SSH into your server without entering a password.

Next Step

I hope this article helped you use SSH on Windows. You might also want to protect SSH service from hacking, I recommend setting up public-key authentication or two-factor authentication.

  • 2 Simple Steps to Set up Passwordless SSH Login on Ubuntu
  • Set Up SSH Two-Factor Authentication (2FA) on Ubuntu Server

Also, you can enable automatic security updates on your Linux server to patch vulnerabilities.

  • Set Up Automatic Security Update (Unattended Upgrades) on Ubuntu

If you want FTP access to the Ubuntu server, you can set up pure-FTPd server.

  • How to Set Up a Secure FTP Server with Pure-FTPd on Ubuntu

As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂

Настраивайте удаленное подключение к Ubuntu вместе с REG.RU! В статье мы опишем варианты удалённого подключения, расскажем, что такое RDP и как настроить удаленный рабочий стол для подключения к Ubuntu из Windows.

Облачные серверы с Ubuntu

Заказывайте Облачный сервер с чистой ОС или стеком LAMP/LEMP. Почасовая оплата, первый платёж — 100 рублей.

Выбрать тариф

Способы удалённо подключиться к Ubuntu из Windows

Есть три основных способа удалённого подключения — через SSH, через VNC (Virtual Network Computing) и c помощью RDP (Remote Desktop Protocol). Для удалённого подключения к Ubuntu лучше всего подойдёт RDP.

RDP — это протокол удалённого управления, который разработала компания Microsoft. Он подходит для удалённой работы пользователя с компьютером или сервером (в том числе с виртуальным сервером), на котором установлен сервис терминальных подключений. С помощью этого встроенного в Windows инструмента можно удалённо подключиться к другим устройствам внутри сети.

Чтобы настроить удаленный доступ к Ubuntu через RDP, нужно знать IP-адрес компьютера или сервера, к которому вы хотите подключиться. Также на Ubuntu нужно установить пакет xrdp и графическое окружение Xfce. После этого вы сможете зайти в Ubuntu из Windows через удалённый рабочий стол.

Установка на Ubuntu xrdp и Xfce

  1. 1.

  2. 2.

  3. 3.

  4. 4.

    Установите пакет xorgxrdp:

    sudo apt install xorgxrdp
  5. 5.

    Активируйте xrdp:

    sudo systemctl enable xrdp
  6. 6.

    Проверьте статус xrdp:

    sudo systemctl status xrdp

    Статус должен быть active:


    Установить Ubuntu RDP

  7. 7.

    Установите графическое окружение рабочего стола Xfce:

  8. 8.

    Запустите xrdp командой:

    sudo systemctl start xrdp

    Совет

    Остановить работу xrdp можно командой sudo systemctl stop xrdp

Готово, вы установили xrdp и Xfce на Ubuntu. Теперь к Ubuntu можно подключиться через удалённый рабочий стол.

Подключение к рабочему столу Ubuntu из Windows

Обратите внимание

Для работы через удалённый рабочий стол вам понадобятся данные учётной записи Ubuntu, а также IP-адрес устройства, к которому вы планируете подключиться. IP-адрес сервера указан в информационном письме, которое пришло на контактный email при заказе услуги, а также в карточке услуги на вкладке «Управление».

  1. 1.

    Откройте меню RDP. Для этого нажмите сочетание клавиш Win+R и введите в строку mstsc:


    Настройка Ubuntu RDP

  2. 2.

    Введите IP-адрес машины, к которой хотите подключиться, и нажмите Подключить:

  3. 3.

    Укажите данные учётной записи Ubuntu, в которой планируете работать, и кликните ОК:

Готово, вы удалённо подключились к Ubuntu из Windows.

Понравилась статья? Поделить с друзьями:
  • Connect to the internet to activate windows 10 как исправить
  • Connect to oracle db from windows
  • Connect to linux ftp from windows
  • Connect to cups printer from windows
  • Connect samsung tv to windows 10