How to connect to linux from windows

How to Connect to VPS

A step-by-step tutorial on how to connect to a VPS server from Windows, Mac, and Linux devices using the SSH protocol.

List of content you will read in this article:

Dealing with servers could be quite a complex task, and we are not even talking about being a server administrator. Something as simple as just connecting to a remote server could be difficult for complete beginners. While servers running Windows Server OS could be remotely controlled using Microsoft’s proprietary remote desktop protocol, the majority of the servers on the entire world wide web run on Linux distributions.

Connecting to a Linux server or VPS is not something that requires a lot of technical knowledge; however, it is not as self-explanatory as connecting their Windows counterparts. Therefore, without someone showing how to accomplish it, most novice users will see it as a roadblock. This article is intended to help you figure out how to connect to your remote Linux server or VPS, however, let us cover some bases first.

What is a Linux?

VPS stands for a virtual private server. It is a service provided by web hosts that splits up a bare-metal server into smaller virtual machines. These VMs are then rented out for a fraction of the price of a dedicated server and each one acts as a standalone server with its own operating system and dedicated resources.

A Linux VPS, as you might have already guessed by now, is just a virtual private server that is running a Linux distribution such as Debian, Ubuntu, CentOS, RHEL, etc. If you want to find out more about VPS servers and what they can be used for, check out our detailed blog on what is a VPS.

What is SSH?

SSH (i.e., Secure Shell) is a very secure and powerful network protocol that allows users to directly access the command line of a Linux server. This will give you the ability to execute Linux commands that control your VPS server and manipulate files & applications from the comfort of your home (or office). By default, the secure shell uses port 22. We do, however, recommend that you change the port for security purposes as in case of an attack, this is the first port that potential hackers will try.

SSH is already automatically built-in to macOS and Linux operating systems but not into Windows. Therefore, you must first install an SSH client such as PuTTY before attempting to connect to a Linux server from a Windows system. In fact, PuTTY is the SSH client we are using for this article and we recommend you do the same.

What is PuTTY?

PuTTY is a free software application for Microsoft Windows operating systems that can be used to make an SSH connection to your server. PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open-source software that is developed and supported by a group of volunteers.

Please note that the IP addresses and usernames used in the following sections of this article, are purely meant to serve as an example and do not represent any actual servers owned by Monovm or any other entity (as far as we know).

How to connect to a Linux server from Windows

As mentioned previously, in order to log in to the Linux server from a Windows device, we will be using a third-party software named PuTTY. If you don’t already have it installed, you can download the application here.

Читайте также:  Freetype6 dll windows 10

Step 1: Open PuTTY Terminal client. You will be greeted with the following window:

Step 2: Enter your connection settings:

  • Host Name: enter the IP of your server here
  • Port: 22 (leave as default)
  • Connection Type: SSH (leave as default)

Step 3: Click «Open» to start the SSH session.

If this is your first time connecting to the server from your computer, you will see the following output. Accept the connection by clicking «Yes».

Once the SSH Connection is open, you should see a terminal prompt asking for your username.

Step 4: Enter your server’s root username as «root».

Step 5: Next, enter your password. You can find it in the Clients Portal. After you typed it in, hit “Enter”.

Please note that you will not see your cursor moving, or any characters typed, when typing your password. Do not worry, this is a standard PuTTY security feature.

How to connect to a Linux server from Linux

Step 1: Open Terminal. To do so, press Ctrl+Alt+T at the same time or type in Terminal into the search function.

Step 2: Type in the following command ssh username@serveripaddress where the username is the user you are connecting to (use root if you wish to have root access) and serveripaddress is the IP address of the server you are connecting to. Then press “Enter”.

For Example: Considering a user ID of “user1” and a URL of server1.com(82.149.65.12), the following syntax should be entered to connect to the server:

Step 3: Enter the password for the selected user and press “Enter”.

How to connect to a Linux from macOS

Step 1: Open Terminal. To do so, go to Applications > Utilities, and then open Terminal.

Step 2: Type in the following command ssh username@serveripaddress where username is the user you are connecting to (use root if you wish to have root access) and serveripaddress is the IP address of the server you are connecting to. Then press “Enter”.

For Example: Considering a user ID of “user1” and a URL of server1.com(82.149.65.12), the following syntax should be entered to connect to the server:

Step 3: Enter the password for the selected user and press “Enter”.

Conclusion

Linux server management can be quite a handful to inexperienced users. We hope that today’s article gave you some insights into what a virtual server and SSH are. We also wish that this detailed guide helped you take the first step in learning how to connect to and take control of your Linux. If you have any questions or suggestions, please leave them in the comment section down below.

Источник

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

Читайте также:  Слетели значки ярлыков windows 10

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.

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.

Читайте также:  Как убрать запрос пин кода windows 10

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:

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.

Источник

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