Vnc from windows to linux

В  мире ИТ существует уже довольно широкий спектр операционных систем, начиная с серверных, заканчивая операционными системами для мобильных устройств. В обычных пользовательских компьютерах и в серверах довольно часто используются две ОС — Linux и Windows. Поэтому очень часто возникают ситуации, когда приходится подключаться по сети из одной операционной системы к другой для выполнения разнообразных операций.

В этой статье мы рассмотрим варианты подключения к Linux из Windows. Существуют бесплатные и условно бесплатные утилиты вроде AnyDesk или TeamViewer, но установка их довольно тривиальна и не нуждается в дополнительном пояснении. Утилиты подобного рода обладают рядом ограничений при бесплатном некоммерческом использовании, либо их функциональность не удовлетворяет тем или иным потребностям пользователя. Мы рассмотрим полностью бесплатные способы как подключится к Linux из Windows.

Удалённый доступ к Linux с помощью VNC

На сегодняшний день самое популярное удаленное подключение к Linux из Windows, с использованием привычный в Windows графического интерфейса, является VNC (Virtual Network Computing) — утилита, использующая протокол RFB (Remote FrameBuffer — удалённый кадровый буфер). Управление осуществляется путём передачи нажатий клавиш на клавиатуре и движений мыши с одного компьютера на другой и ретрансляции содержимого экрана через компьютерную сеть.

В качестве сервера VNC в данном примере будет использоваться  TightVNC, установленный в Ubuntu 20.04. Для установки сервера VNC необходимо выполнить ряд действий:

Шаг 1. Установка рабочей среды XFCE

Xfce — одна из самых легковесных рабочих сред, используемых в Linux, она будет быстро работать даже при слабом и нестабильном сетевом подключении. Установите её с помощью команд:

sudo apt update

sudo apt install xfce4 xfce4-goodies

Шаг 2. Установка TightVNC

Далее установите TightVNC:

sudo apt install tightvncserver

Шаг 3. Настройка пароля

Перед началом выполнения всех действий необходимо задать пароль пользователя VNC.  Выполните команду:

vncpasswd

Вам будет предложено создать новый пароль, а также пароль только для просмотра. Откажитесь от второй опции:

Завершите процесс vncserver:

vncserver -kill :1

Шаг 4. Настройка скрипта запуска

Отредактируйте скрипт, который выполняется после запуска VNC-сервера:

nano ~/.vnc/xstartup

Он должен содержать такой текст:

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

Сделайте файл исполняемым:

chmod +x ~/.vnc/xstartup

Шаг 5. Запуск VNC сервера

На этом этапе уже можно запустить VNC-сервер с помощью команды:

vncserver

Шаг 6. Подключение из Windows

Для того, чтобы подключиться из Windows к вашему Linux-серверу, используйте TightVNC Viewer.

Укажите IP-адрес компьютера, к которому нужно подключиться, и номер порта в поле Remote Host. В данном примере — 192.168.56.102::5901:

После того, как будет введён пароль, вы должны увидеть рабочий стол Xfce:

Шаг 8. Настройка systemd

Для того, чтобы запуск вашего VNC-сервера добавить в автозагрузку надо использовать systemd. Создайте новый файл сервиса systemd:

sudo nano /etc/systemd/system/vncserver@.service

Его содержимое должно быть следующим:

[Unit]
Description=Systemd VNC server startup script for Ubuntu 20.04
After=syslog.target network.target
[Service]
Type=forking
User=ubuntu
ExecStartPre=-/usr/bin/vncserver -kill :%i &> /dev/null
ExecStart=/usr/bin/vncserver -depth 24 -geometry 800x600 :%i
PIDFile=/home/ubuntu/.vnc/%H:%i.pid
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target

Измените имя пользователя ubuntu и рабочего каталога ubuntu на нужные вам значения. Если у вас запущен VNC-сервер, остановите его:

vncserver -kill :1

Сообщите systemd о появлении нового сервиса:

sudo systemctl daemon-reload

Добавьте запуск вашего нового сервиса в список автозагрузки:

sudo systemctl enable vncserver@1.service

Запустите VNC-сервер:

sudo systemctl start vncserver@1

Использование RDP для удалённого подключения

Помимо VNC, для управления Linux-сервером из Windows можно воспользоваться RDP (Remote Desktop Protocol). Для этого на компьютере с Ubuntu 20.04 установите утилиту xrdp:

sudo apt install xrdp

Для корректной работы сервиса необходимо добавить пользователя xrdp в группу ssl-cert:

sudo adduser xrdp ssl-cert

Установите Xfce:

sudo apt-get install xfce4

Добавьте Xfce в сессии RDP в качестве рабочего стола по умолчанию:

echo xfce4-session >~/.xsession

Перезапустите сервис xrdp:

sudo systemctl restart xrdp.service

Процедура подключения из Windows к Linux-серверу по протоколу RDP почти ничем не отличается от подключения к удалённым Windows-серверам. Введите IP-адрес сервера, логин и пароль пользователя в Linux:

Если всё сделано правильно, вы увидите рабочий стол Xfce:

Для подключения к компьютеру под управлением Linux по протоколу SSH из Windows можно воспользоваться PowerShell. Сначала становите OpenSSH Client, если ещё не установлен. Запустите на вашем компьютере PowerShell от имени администратора системы и выполните следующую команду:

Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

Это необходимо для того, чтобы узнать текущую версию SSH-клиента. В данном примере доступна версия OpenSSH.Client-0.0.1.0. Установите OpenSSH.Client с помощью команды:

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Для того, чтобы подключиться к устройству, на котором запущен SSH-сервер, необходимо ввести имя пользователя и IP-адрес. Команда для подключения по SSH используя PowerShell выглядит так:

ssh ubuntu@192.168.56.1

Здесь ubuntu — имя пользователя на удалённом компьютере, а 192.168.56.1 — IP-адрес Linux-сервера, на котором запущен демон SSH.

При первом подключении необходимо подтвердить использование специального персонального ключа для шифрованного соединения по SSH-протоколу (введите слово Yes), затем введите пароль пользователя (в данном случае для пользователя ubuntu):

Как видите, соединение прошло успешно. Теперь можно выполнять все команды так же, как если бы вы их выполняли используя стандартный Linux SSH-клиент:

Для завершения терминальной сессии на удалённом компьютере введите команду exit. Теперь вы знаете как выполняется подключение к Linux из Windows по SSH.

Использование Putty для подключения к Linux

Пожалуй, одним из самых популярных способов подключения к Linux из Windows является кроссплатформенная утилита Putty — небольшая по размерам, но очень часто незаменима для подключения по таким протоколам как SSH, Telnet, rlogin и даже с помощью последовательных портов.

Для обычного подключения к Linux-серверу по протоколу SSH достаточно в поле Host Name (or IPaddress) указать его IP-адрес и нажать кнопку Open (в данном примере Linux-сервер имеет IP-адрес: 192.168.56.102):

При первом подключении Putty предупредит, что используется специальный ключ безопасности и его нужно добавить в доверенные хосты. Нажмите кнопку Да:

Далее нужно будет ввести логин и пароль.  Если всё сделано правильно,  запустится удалённая сессия терминала Linux:

Мало кто знает, что Putty позволяет запустить почти любое приложение, установленное на компьютере с Linux, по сети в Windows. Для этого на компьютере с Windows нужно установить собственный X-сервер. В данном примере воспользуемся Xming.

Скачайте Xming с официального сайта. Установка довольно тривиальная, поэтому не будем на ней останавливаться. Ничего не меняйте в процессе установки. Просто нажимайте кнопку Next до тех пор, пока программа не установится и не запустится:

Когда установка Xming завершится, откройте Putty и в настройках сессии для вашего подключения в разделе SSH -> X11 включите флажок напротив опции Enable X11 forwarding, а также, в строке Отображение дисплея X впишите значение localhost:0, после чего откройте сессию подключения с помощью кнопки Open:

В открывшемся терминале Putty введите консольное название программы, обладающей графическим интерфейсом. В данном примере введено название графического редактора drawing:

drawing &

(Знак & позволит запустить программу в фоновом режиме, в этом случае в окне Putty можно будет выполнять и другие команды):

Как видите, Linux-приложение drawing успешно запустилось по сети на X-сервере, установленном в Windows. С ним можно работать так же, как и с локальным приложением.

Выводы

Сегодня не существует слишком уж больших проблем для подключения к Linux из Windows. Способов существует довольно много. Каждый из них обладает своими достоинствами и недостатками, например, скорость работы VNC, да и других тоже, существенно зависит от скорости сетевого соединения. Существуют также программные средства, позволяющие подключаться к Linux-серверам используя мессенджеры или браузеры.

Обнаружили ошибку в тексте? Сообщите мне об этом. Выделите текст с ошибкой и нажмите Ctrl+Enter.

Creative Commons License

Статья распространяется под лицензией Creative Commons ShareAlike 4.0 при копировании материала ссылка на источник обязательна .

Skip to content

VNC from Windows to Linux

VNC from Windows to Linuxadmin2020-10-01T14:10:54-08:00

Connecting using VNC from a Windows computer to a Linux system

Virtual Network Computing, or VNC, allows you to remotely control a Linux computer with another computer through a graphical interface. You will be able to observe a Linux desktop environment and interact with it using the mouse and keyboard from a different computer. This guide will walk you through how to start a VNC session and connect with it when using a Windows-based computer.

Table of Contents
  • Preliminary Notes
    • Software
    • VPN Requirements
    • Important Terminology
  • Starting VNC Session
    1. Opening Terminal
    2. Connecting to Linux system with SSH
    3. Starting VNC session process
    4. Creating VNC session password
    5. Getting Display/Port numbers
  • Connecting with your VNC session with MobaXterm’s VNC viewer
    1. Opening new VNC viewer session
    2. VNC viewer setup
    3. SSH Gateway setup
    4. VNC password guide
  • Disconnecting vs. Terminating your VNC session
  • Checking for existing VNC sessions
  • Changing your VNC password

Preliminary Notes

Software

For users looking to use VNC on their Windows computer, we recommend using MobaXterm. It is a free, all-in-one solution that we find is easiest to get up and running with VNC for users. This guide is intended for use with MobaXterm and may not be applicable with other terminal and VNC viewing software.

You can download MobaXterm using the following link:

https://mobaxterm.mobatek.net/download.html

VPN Requirements

Certain MCECS Linux systems, such as the Redhat/CentOS servers (e.g. auto.ece.pdx.edu and mo.ece.pdx.edu), require the use of a VPN when accessing from outside of the PSU campus.

For more information on how to set up OpenVPN on Windows, read our guide in the following link:

Using OpenVPN on Windows

Important Terminology

Here are some key terms to remember when connecting with VNC

  • VNC session password – this password is used only with VNC. This is not tied to your MCECS login. Because the encryption on this password is extremely weak, do not use a password that you want to keep private as your session password.
  • Display Number – when you start a VNC session, it will be assigned a number between 1 and 99 that will identify it on the Linux system you are remotely connected to.
  • Port Number – This is equal to your Display Number plus 5900. This number is used by the VNC viewer software to remotely connect with the VNC session running on MCECS Linux systems.
  • Host Address – this is the full domain name of the system you want to remotely connect with. This is usually in the form of somecomputer.cs.pdx.edu, somecomputer.ece.pdx.edu, or somecomputer.cecs.pdx.edu

Starting the VNC session

Step 1 – Opening a terminal

Open MobaXterm and click on the Start local terminal button, as highlighted in the image below.

Starting new session in MobaXterm

Step 2 – Connecting to Linux system with SSH

In the command line, enter the following command

ssh your_username@host_name

Replace your_username with your MCECS username and replace host_name with the address of the MCECS Linux machine or server you want to connect with (for example, mo.ece.pdx.edu or rita.cecs.pdx.edu). 

Enter your MCECS account password when prompted, and log in to the host system.

Step 3 – Starting VNC session process

Start a VNC session by entering the command vncserver

Command for starting VNC session

NOTE: If you see the following message after entering vncserver, this means you have a VNC session already running on this system. Go to the end of this article for more information on how to check for existing VNC sessions and also how to terminate them.

Terminal output if vncserver is already running

Step 4 – Creating VNC session password

You should now see a prompt to enter a password like in the image below. This will be your VNC session password.

Be aware of the following:

  • The session password needs to be at least 6 characters long.
  • This password is only used to log in to your VNC session and is not tied to your MCECS account password.
  • This password is stored with very poor encryption, so it is advised that you do not use a sensitive password for your VNC session password.

You will also be prompted to enter a view-only password, which can be used by other people to observe your VNC session. If you are unsure about this feature, enter n for “no” and avoid creating one.

Enter a password at least 6 characters long, verify the password, then enter n for no viewing password

NOTE: It is possible you may not see a password prompt. If you have previously used VNC, the new process will sometimes use your previous session password. If you have forgotten your previous session password, run the command vncpasswd to change it.

Step 5 – Getting Display/Port numbers

Your VNC session has been created, and you should see a message similar to the sample output below

Output when VNC successfully starts up

The number that appears after the host address is the display number (it is underlined in red in the image above). By adding this number to 5900, this will give you the port number used to connect your VNC viewer to the VNC session. 

For example, if your display number is 4, your port number is 5904. If your display number is 12, your port number is 5912.

NOTE: Your display number may not be the same as the sample image above. Make sure to read the output message in your terminal and look for the number after the semicolon for your true display number.

The VNC session is now running on the remote Linux host system and is ready to connect with your VNC viewing software. You can exit and close this terminal if you want, as the VNC session will continue to run in the background. Be aware that the CAT will kill any VNC session that has been idle for more than 48 hours.

Connecting with your VNC session with MobaXterm’s VNC viewer

Step 1 – Opening new VNC viewer session

In MobaXterm, click on the Session button in the upper left hand corner

Location of Session button in MobaXterm

Step 2 – VNC viewer setup

In the window that pops up, look for the VNC icon in the top row and click on it

  • In the Remote hostname or IP address box, enter localhost
  • In the Port box, enter your Port Number. Recall that this is 5900 plus the Display Number that appeared after running the vncserver command
Setting for VNC Viewer in MobaXterm

Step 3 – SSH Gateway setup

In the lower area, click on the Network Settings tab, and then click on the SSH gateway (jumphost) button. The button is highlighted in the blue box in the image above.

In the window that pops up, enter the following

  • In the Gateway host box, enter the address of the host machine that your VNC session is running on (e.g. ada.cs.pdx.edu, mo.ece.pdx.edu, etc).
  • In the Username box, enter your MCECS username
  • In Port, leave it set at 22
  • Do not check off the box for Use SSH key.

Afterwards, click the OK button with the green checkmark to save these settings and close this configuration window.

SSH Gateway settings

When you return to the previous menu, click the OK button again and connect MobaXterm’s VNC Viewer with the remote VNC session

final OK button to click

Step 4 – VNC password guide

When you see the following window asking for the password for MCECS username on the host address, enter your MCECS login password. This window may or may not appear, depending on how recently you used MobaXterm to view a VNC session previously.

Prompt for MCECS login password

When you see the following window asking for the password for localhost, enter your VNC session password.

Prompt for VNC session password

A new tab should now appear in MobaXterm with a Linux graphical interface. Congratulations! You are now remotely connected with a Linux system via VNC.

Successful connection from VNC viewer to remote VNC session

Disconnecting vs. Terminating your VNC session

It is possible to disconnect from your VNC session and reconnect with it later on to pick up where you left off. In MobaXterm, if you close the tab or click on the Disconnect button, your VNC session will not end and will continue to run on the host system. To reconnect with your session, simply follow the instructions above for Connecting with your VNC session with MobaXterm’s VNC viewer using the same session password and port number as before.  

Be aware that on CAT-supported systems, VNC sessions are terminated if they have been idle for more than 48 hours.

Methods to disconnect from VNC session

If you want to kill the VNC session, you can use the Log Off or Shutdown option in the Linux graphical interface. The location of these options will vary depending on the version of Linux on the host system and your personal settings.

Ways to kill VNC session with GUI in different versions of Linux

Alternatively, you can kill VNC sessions using the command vncserver -kill :X, where X is replaced with your session’s Display Number.

output when VNC session is killed via command line

Checking for existing VNC sessions

If you want to check for existing VNC sessions or find its display number, run the command vncserver -list

If there is an existing session, you will see the following output

output when vncserver -list is run and there is an existing vnc session running

If there are no sessions running, you will see the following output

Output when vncserver -list is run and there is no active vnc session running

Changing your VNC password

If you want to change your VNC session password, run the command vncpasswd and follow the prompts. The session password can be changed even if you have VNC currently running, allowing you to use the new password even after starting a session.

output when changing VNC session password with vncpasswd

In this article, we’ll discuss how to remotely access your Linux or Ubuntu desktop GUI from Windows using VNC, making it easier than ever to manage your Linux server from anywhere in the world.

One of the key features of the Linux server is its ability to be accessed remotely, allowing you to control it from another device. One of the most common methods to achieve this is by using Virtual Network Computing (VNC).

In this article, we will guide you step-by-step through the process of remotely connecting to a Linux desktop GUI via VNC.

Remotely connecting and accessing a Linux server Remote Desktop involves the following steps:

  1. Setting up a desktop environment (XFCE) for your Linux server
  2. Installing TightVNC Server on the Linux server, as well as install the TightVNC client for Windows or Mac.
  3. Installing SocketXP Linux Server Remote Access[/remote-access-linux-server] agent on the Linux server.
  4. Connecting to Linux server remotely via the TightVNC client from a Windows or Mac laptop over the internet.

Step 1: Setting up XFCE desktop environment on Linux server

Before you can remotely connect to your Linux server via VNC, you need to make sure your Linux server is set up and running.

This includes installing an operating system (such as Ubuntu) and connecting your Linux server to a display, keyboard, and mouse.

Additionally, make sure your Linux server is connected to the internet via an Ethernet cable or Wi-Fi.

For this tutorial we will assume that your Linux server doesn’t have a GUI desktop environment installed. We will install XFCE desktop environment, to have the actual desktop accessible on the Linux server.

Note: If your Linux server already has a desktop environment set up, say Ubuntu Desktop, then you can skip this step and jump to the next step.

sudo apt install -y xfce4 xfce4-goodies 

Next, we will install tightvncserver to be able to access that GUI desktop.

Step 2: Installing TightVNC server on Linux server

Use the following command to install TightVNC server on Linux server.

sudo apt install -y tightvncserver

The next thing we’ll have to do is to set up an access password for VNC clients. This is done on the first run of your VNC server. Simply run the command below:

vncserver

You will be asked to provide two passwords.

One is an access password and the other is a view-only password.

The access password lets you connect to the desktop and interact with it using keyboard and mouse whereas the view-only password will only let a user observe your desktop.

The view only password is optional so you can skip setting it up when asked by pressing the enter key on your keyboard.

Now that the password is set up we will configure a startup file for VNC.

Firstly, we’ll have to shut down our currently running VNC server.

vncserver -kill :1

Then we’ll create a backup of current startup file, in case we’d like to revert back to it.

mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

Finally, we’ll create a new startup file.

printf '#!/bin/bash\nxrdb $HOME/.Xresources\nstartxfce4 &\n' > ~/.vnc/xstartup
sudo chmod +x ~/.vnc/xstartup

This will create the following file:

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 & 

The first line xrdb $HOME/.Xresources tells the VNC’s GUI framework to read the server user’s Xresource file.

The second line starts the Xfce in background.

Now, re-start the VNC server using the command below.

$ vncserver

Now we’re ready to access our Linux server desktop via VNC from our Windows or Mac PC on a local network.

But our goal is to connect to Linux server remotely via VNC over the internet.

For this, we’ll use the SocketXP Linux server Remote Access solution as shown in the next step.

Step 3: Installing SocketXP Linux server Remote Access Agent

We need to install SocketXP Linux server Remote Access Agent to run in two different places:

  • Linux server — in IoT Master Mode (Default Mode)
  • Windows Laptop or PC — in IoT Slave Mode

Follow the SocketXP download and install instructions to install the SocketXP Remote Access agent on the Linux server and the access devices.

To make SocketXP agent to run in IoT Master Mode (which is the default mode of SocketXP agent) use the below command.

$ socketxp  connect tcp://localhost:5901

Connected to SocketXP Cloud Gateway.
Access the TCP service securely using the SocketXP agent in IoT Slave Mode.

where localhost port 5901 is the VNC server port, on which tightvncserver is listening for connections from a VNC viewer .

Next, to access the Linux server device from your Windows laptop or PC, install SocketXP Agent for Windows and run the below command:

$ ./socketxp.exe connect tcp://localhost:10111 --iot-slave --peer-device-id "2233-abcdefgh-2342abc" --peer-device-port 5901 --authtoken <auth token>
Listening for TCP connections at:
Local URL -> tcp://localhost:10111  

where 10111 is a local port on your PC at which you want to access the Linux server. You can choose to use any free local port instead of port 10111.
You shall find the device ID of your Linux server device from the SocketXP Portal page in the IoT Devices section.

Step 4: Connecting remotely to Linux server via VNC viewer from Windows:

Install TightVNC Viewer from the TightVNC website.

Launch TightVNC Viewer and it will bring you straight to the login window. Fill it out with the following details:

- Remote Host: localhost:10111.

access linux server remotely via vnc

When done click on “Connect”. This will bring you to the authentication window.

connect linux server via vnc remotely

This is where you provide your access password that you’ve set up in the first section of this article. When you click OK, you will see the desktop of your Linux server.

linux server remote access via vnc

Please keep in mind that there’s a lot of data being transferred in between your Linux server and your Windows PC in order to provide live desktop experience, so the quality and response time might not be exactly as on a local desktop.

Conclusion:

Remote access to your Linux server via VNC can be a powerful tool that allows you to control your Linux server from any device with a VNC viewer installed.

SocketXP Linux Server Remote Access Solution is a highly scalable solution that uses secure SSL/TLS tunnel to remotely connect and access Linux server VNC server from a Windows Laptop or a Mac Book.

With the simple steps outlined in this article, you can easily set up and connect to your Linux server remotely via VNC.

This can be particularly useful in scenarios where you want to access your Linux server headless (without a display, keyboard, and mouse), or when you need to manage your Linux server from a different location.

So go ahead and try remote access via VNC for your Linux server and enjoy the flexibility and convenience it offers!

Вам нужен удаленный доступ к настольному компьютеру Linux из Windows? Вот что вам нужно знать о RDP, VNC и SSH для Linux.

Установили сервер Linux? Возможно, вы настроили его как решение для сетевого хранения данных. А может быть, у вас есть рабочий ПК с Linux, медиацентр или вы просто держите дополнительный ПК в другой комнате.

Как бы то ни было, в какой-то момент вам понадобится удаленный доступ к устройству Linux с ПК или ноутбука под управлением Windows. Каково же решение?

У пользователей Windows есть несколько инструментов, которые обеспечивают простой удаленный рабочий стол с Windows на Linux. Хотите узнать, как сделать удаленный рабочий стол с Windows на Linux? Читайте дальше!

Вам понадобится IP-адрес устройства Linux

Перед тем как удаленно подключиться к Linux из Windows, вам понадобится IP-адрес устройства. Он нужен для всех вариантов удаленного подключения, хотя в некоторых случаях достаточно имени хоста (сетевого имени устройства).

Самый простой способ проверить IP-адрес – войти в систему на устройстве Linux и открыть терминал. Введите:

hostname -I

На экране появится IP-адрес устройства. Для получения более подробной информации вы также можете использовать

ip address

Если ваша система Linux имеет несколько соединений, они будут перечислены с префиксами. Например, подключение Ethernet будет перечислено как eth0. Если система подключена к беспроводной сети, ищите IP-адрес, указанный напротив wlan0.

Если это не так просто или неудобно, есть другой способ, который почти так же прост. В окне браузера подключитесь к маршрутизатору. Обычно это адрес 192.168.0.1 или 192.168.0.0. Посмотрите на самом маршрутизаторе или в документации, которая прилагается к нему.

Получение IP-адреса устройства Linux

Получение IP-адреса устройства Linux

Войдя в маршрутизатор, найдите опцию со списком подключенных устройств. Просмотрите IP-адреса, чтобы найти устройство Linux по имени хоста. Некоторые маршрутизаторы могут даже отображать операционную систему устройства. IP-адрес будет указан рядом, его следует записать на будущее.

Первый и самый простой вариант – это RDP, протокол удаленного рабочего стола, который встроен в Windows.

Перед началом работы вам необходимо установить программное обеспечение xrdp на ваш Linux-компьютер. Вы можете сделать это с помощью одной команды:

sudo apt install xrdp

Для RDP в Linux запустите программу Remote Desktop на машине Windows. В Windows 8 и более поздних версиях ее можно найти через Поиск, просто введя буквы “rdp”.

Откройте окно “Подключение к удаленному рабочему столу”:

  • Введите IP-адрес
  • Используйте Показать параметры для любых дополнительных требований к подключению
  • Нажмите кнопку Подключиться

Используйте приложение удаленного рабочего стола Windows

Используйте приложение удаленного рабочего стола Windows

Все очень просто.

Преимущества RDP: несмотря на то, что настройка может занять немного больше времени, использование RDP обеспечивает высокую надежность и удаленный доступ к рабочему столу Linux. Это делает его идеальным инструментом для удаленной работы с машинами Linux.

Если вы планируете использовать RDP на регулярной основе, вы можете сэкономить немного времени, создав эти пользовательские конфигурации для Windows RDP.

Подключение к Linux из Windows с помощью VNC

Виртуальное сетевое подключение (VNC) также позволяет получить удаленный доступ к рабочему столу Linux. Однако, как и в случае с RDP, вам потребуется установить специальное программное обеспечение.

Для Linux требуется серверное программное обеспечение VNC, для Windows – клиентское приложение.

Одним из самых популярных вариантов подключения к Linux через VNC является TightVNC. Клиентское программное обеспечение для Windows вы найдете на сайте, но убедитесь, что выбрали правильную версию.

Скачать: VNC для Windows

После этого установите tightvncserver на свой Linux-компьютер. Это можно сделать через SSH (см. следующий раздел) или с физическим доступом к компьютеру.

Сначала в Linux проверьте наличие обновлений:

sudo apt update

Затем установите TightVNC Server:

sudo apt install tightvncserver

После установки запустите tightvncserver и задайте пароль, когда появится запрос.

sudo tightvncserver

Для паролей существует ограничение в восемь символов. После запуска tightvncserver вы увидите уведомление с номером порта – запишите его.

Как только вы это сделаете, вы сможете подключиться к машине Linux из Windows:

  • Запустите приложение TightVNC Viewer в Windows.
  • Введите IP-адрес и номер порта
  • Нажмите кнопку Подключиться
  • Введите установленный пароль, когда появится запрос

Подключение к Linux из Windows через VNC

Подключение к Linux из Windows через VNC

После этого откроется удаленный рабочий стол, и вы сможете начать использовать выбранное вами приложение – в пределах разумного. Некоторые приложения с высокими графическими требованиями вряд ли будут работать надежно, если вообще будут работать.

Преимущества VNC: предлагая быстрый доступ к удаленному ПК, TightVNC имеет свои ограничения. Вы можете выполнять стандартные вычислительные задачи, но деятельность, связанная с мультимедиа, сильно ограничена.

Удаленный доступ в Linux через SSH

SSH (Secure Shell) – это отличный способ получить удаленный доступ к вашему Linux-устройству. Этот способ не ограничивается Windows, так как SSH можно использовать практически с любого устройства. Он также очень безопасен.

У вас есть два варианта использования SSH в Windows:

  • SSH в Windows PowerShell
  • Скачать инструмент SSH PuTTY

Давайте рассмотрим оба варианта.

Удаленный доступ к Linux с помощью SSH в Windows PowerShell

Windows PowerShell – это новый инструмент командной строки в Windows 10, заменивший старое приложение Command Prompt. Найдите его, щелкнув правой кнопкой мыши “Пуск”, чтобы открыть меню “Питание”, и выберите Windows PowerShell. Чтобы подключиться по SSH, введите:

ssh [IP_ADDRESS].

Так, если устройство Linux имеет IP-адрес 192.168.13.123, введите:

ssh 192.168.13.123
  • Когда появится запрос, примите сертификат
  • Введите имя пользователя и пароль

Теперь у вас есть удаленный SSH-доступ к Linux.

Удаленное подключение к Linux с помощью SSH в PuTTY

Приложение PuTTY можно скачать, хотя оно и недоступно в Windows. Однако PuTTY не устанавливается. Вместо этого вы просто запускаете загруженный EXE-файл.

Скачать: PuTTY (бесплатно)

Для удобства рекомендуется создать ярлык на рабочем столе.

Чтобы использовать PuTTY для SSH:

  • Выберите Сеанс > Имя хоста
  • Введите сетевое имя компьютера Linux или введите IP-адрес, который вы указали ранее.
  • Выберите SSH, затем Открыть
  • Когда появится запрос на принятие сертификата для соединения, сделайте это.
  • Введите имя пользователя и пароль для входа на устройство Linux.

Удаленное подключение к Linux из Windows с помощью PuTTY

Удаленное подключение к Linux из Windows с помощью PuTTY

Преимущества SSH: использование этого метода позволяет быстро вносить изменения в Linux, не пачкая рук. Особенно подходит для установки программного обеспечения и изменения администратора. Он также полезен для настройки следующего варианта, VNC! SSH также идеально подходит для серверов без установленной среды рабочего стола.

Однако если вам нужно удаленное подключение к рабочему столу Linux из Windows, попробуйте VNC или RDP.

Три метода удаленного рабочего стола Windows для подключения к Linux

Независимо от вашей цели, найдется подходящий вариант подключения к машине Linux из Windows. Эти методы работают независимо от того, является ли устройство сервером, настольным ПК на работе, медиацентром или даже Raspberry Pi.

От самого простого к самому сложному – удаленный доступ к Linux из Windows с помощью:

  • RDP (протокол удаленного рабочего стола)
  • VNC (виртуальное сетевое подключение)
  • SSH (Secure Shell)

Если ваш дистрибутив Linux – Ubuntu, у вас уже есть встроенный инструмент удаленного рабочего стола, совместимый с VNC.

Need to remotely access your Linux desktop computer from Windows? Here’s what you need to know about RDP, VNC, and SSH to Linux.

remote access linux from windows

Set up a Linux server? Perhaps you’ve configured it as the solution to network storage. Or maybe you have a Linux work PC, media center, or simply keep a secondary PC in another room. Whatever the case, at some point, you’ll need to remotely access the Linux device from a Windows PC or laptop. So, what is the solution?

Windows users have several tools that enable simple remote desktop from Windows to Linux. Want to know how remote desktop from Windows to Linux? Read on!

You’ll Need the Linux Device’s IP Address

Before you can remote into Linux from Windows, you’ll need the device’s IP address. It’s useful for all remote connection options, although in some cases, the hostname (the device’s network name) will do.

The simplest way to check the IP address is to log in to you your Linux device and open the terminal. Enter:

 hostname -I 

The IP address of the device will be displayed. For more details, you can also use:

 ip address 

If your Linux system has multiple connections, these will be listed with prefixes. For example, an Ethernet connection will be listed alongside eth0. If it’s connected wirelessly, look for the IP address listed against wlan0.

If this isn’t easy or convenient, there is another method that is almost as simple. In your browser window, connect to your router. This is usually an address like 192.168.0.1 or 192.168.0.100. Check this by looking at the router itself or the documentation that came with it.

Get your Linux device IP address

Once signed in to the router, look for an option that lists connected devices. Browse through the IP addresses to find your Linux device by hostname. Some routers can even display the device’s operating system. You’ll find the IP address listed alongside, which you should note down for later.

How to RDP From Windows to Linux

The first and easiest option is RDP, Remote Desktop Protocol, which is built into Windows.

Before starting, you’ll need to install the xrdp software on your Linux box. You can do this in person or using SSH (see below) with a single command:

 sudo apt install xrdp 

To RDP to Linux, run the Remote Desktop software on your Windows machine. In Windows 8 and later, you can find it via Search simply by inputting the letters «rdp».

With the Remote Desktop Connection window open:

  • Input the IP address
  • Use Show Options for any advanced connection requirements
  • Click Connect
Use Windows remote desktop app

It’s as simple as that.

Benefits of RDP: while it might take a bit longer to set up, using RDP provides great reliability and remote desktop access to Linux. This makes it an ideal tool for remote working with Linux machines.

If you use plan to use RDP regularly, you can save some time by creating these custom configurations for Windows RDP.

Connect to Linux From Windows With VNC

A Virtual Network Connection (VNC) also affords remote access to your Linux desktop. As with RDP, however, you’ll need to install some dedicated software. On the Linux box, the VNC server software is required; on Windows, a client app.

One of the most popular options for connecting to Linux over VNC is TightVNC. You’ll find the Windows client software on the website, but make sure you choose the right version.

Download: VNC for Windows

Once you’ve done that, install tightvncserver on your Linux box. This might be via SSH (see the next section) or with physical access to the computer.

First, in Linux, check for updates:

 sudo apt update 

Next, install TightVNC Server:

 sudo apt install tightvncserver 

Once installed, run tightvncserver, and set a password when prompted.

 sudo tightvncserver 

There is an eight-character limit for passwords. With tightvncserver now running, you’ll see a notification displaying the port number—make a note of it.

Once you’ve done that, here’s how to connect to the Linux machine from Windows:

  1. Run the TightVNC Viewer app on Windows
  2. Input the IP address and port number
  3. Click Connect
  4. Input the password you set when prompted
Connect to Linux from Windows over VNC

The remote desktop will then open, and you can start using the app of your choice—within reason. Certain applications with heavy graphical demands are unlikely to run reliably, if at all.

Benefits of VNC: offering fast access to the remote PC, TightVNC has its limits. You can perform standard computing tasks, but media-related activities are severely limited.

Remote Into Linux via SSH

SSH (Secure Shell) is a great way to gain remote access to your Linux device. You’re not limited to Windows with this option, either, as SSH can be used from almost any device. It’s also very secure.

You have two options for SSH on Windows:

  1. SSH in Windows PowerShell
  2. Download the PuTTY SSH tool

Let’s look at both.

Remote Access Linux With SSH in Windows PowerShell

Windows PowerShell is the new command line tool in Windows 10 and 11, replacing the old Command Prompt app. Find it by right-clicking Start to access the Power Menu and selecting Windows PowerShell. To SSH, enter:

 ssh [IP_ADDRESS] 

So if the Linux device has an IP address of 192.168.13.123, enter:

  • ssh 192.168.13.123
  • When prompted, accept the certificate.
  • Input the username and password.

You now have remote SSH access to Linux.

Connect to Linux Remotely Using SSH in PuTTY

Although not natively available in Windows, you can easily download the PuTTY application. You don’t need to install PuTTY, however. Instead, you simply run the downloaded EXE file.

Download: PuTTY (Free)

For convenience, it’s a good idea to create a desktop shortcut.

To use PuTTY for SSH:

  • Select Session > Host Name
  • Input the Linux computer’s network name, or enter the IP address you noted earlier.
  • Select SSH, then Open.
  • When prompted to accept the certificate for the connection, do so.
  • Enter the username and password to sign in to your Linux device.
Remote connect to Linux from Windows using PuTTY

Benefits of SSH: using this method lets you make quick changes to Linux without getting your hands dirty. Particularly suited to software installation and admin changes. It’s also useful for setting up the previous option, VNC! SSH is also perfect for servers without a desktop environment installed.

However, if you need a remote connection to the Linux desktop from Windows, try VNC or RDP.

Three Windows Remote Desktop Methods for Connecting to Linux

Whatever your purpose, there is a suitable option to connect to a Linux machine from Windows. These methods work whether the device is a server, desktop PC at work, media center, or even a Raspberry Pi.

So, if you are wondering which of the following tools you can use to get a remote session on a UNIX/Linux system, here they are from easiest to toughest:

  • RDP (Remote Desktop Protocol)
  • VNC (Virtual Network Connection)
  • SSH (Secure Shell)

If your Linux distro happens to be Ubuntu, you already have a built-in VNC-compatible remote desktop tool with which you can easily create a Linux remote desktop server, or Linux RDP, for short.

  • Vnc server windows что это
  • Vnc from windows to mac
  • Vnc client mac to windows
  • Vmware скачать для windows 10 x32
  • Vmware скачать для windows 10 x64 крякнутый