How to Connect to a Linux Server Remotely

Depending on the operating system you are using locally, the way to remotely connect to a Linux server is different. This article will introduce how to use username and password authentication to connect to Linux servers from Windows, Linux, MacOS, and mobile devices.

Prerequisites

You already get the server login credentials
Once your server is deployed, the login credentials are usually sent to your registered email. You can also get server login information, including username, password, and port in the Database Mart control panel, please refer to guide on how to manage servers in Database Mart control panel.

How to Connect to a Linux Server

Connect from Windows

You can connect to Linux from Windows through a variety of tools, such as PuTTy, Xshell, and XRDP. Here we take PuTTy as an example to introduce how to log in to a Linux server from a local Windows computer.

Save a server login profile in PuTTY

In PuTTy, you can create and save profiles for different remote server connection information. This is so that you don't have to manually configure the connection information each time you initiate a connection.

1. Download PuTTy on your local computer.
2. Double-click putty.exe to open the PuTTY client.
3. In the PuTTY Configuration window, enter the following content as shown in the figure below.

Under Session Category
1. Host Name (or IP address): The public IP of the Linux server
2. Port: The default port is 22. If the port has been changed, please use the updated one.
3. Connection Type: Select SSH.

Note: The connection information can be found on the overview page in the control panel. If you have difficulty in finding the right information, please refer to the guide on how to manage your server.

Save server IP and port in PuTTy

Under Connection Category - Data
1. Auto-login username: Enter the username you are about to log in to. In this example, we use administrator.

Save username in PuTTy

Return to Session Category
1. Saved Sessions: Configure a name for this session and click Save. Each time, you can directly double-click "Saved Sessions" to log in to the server.

Save session

Log in to the Linux server

1. When you are taken to the "PuTTY" running interface, which prompts the following:
Using username "auto-login username"
auto-login name@IP's password:

2. Enter the password after "password" and press Enter. The entered password is not displayed by default, as shown in the figure below. In the SSH session, right-clicking the mouse will paste the content in the clipboard. If you have copied password, simply right-click after the password line and press Enter.
Then, you should be able to log in to the session.

Log in to Linux servers

Connect from MacOS, Windows, and Linux using the command line.

Local computers using MacOS, Windows, and Linux operating systems can use the command line to connect to the Linux servers. Please refer to our YouTube tutorials: How to Access and Run Basic Linux Commands with CMD (10 SIMPLEST file management commands) and How to Access Linux Server via Mac.

Open the Command Execution Interface

To open the command execution interface, operations on each operating system may be slightly different. Follow the following prompts to open it:

MacOS system: Open the Terminal that comes with the system
Windows system: Open the command prompt (CMD).
Linux system: Commands can be executed directly.

Open the command execution interface on different operating systems

Connect to Linux servers

If you are using the default port 22, then enter the following command and press Enter.

ssh "username"@"hostname or IP address"

username:The username to log in
hostname or IP address:Enter IP or hostname.
port: If you use a non-default port, you need to replace the "port" part below with the custom port.

ssh "username"@"hostname or IP address" -p "port"

You may receive the notification as "The authenticity of host can be established... Are you sure you want to continue connecting?" Simply input yes and press enter. After that, type or paste the password after "password" to log in to the Linux server.

Connect from Mobile Devices

Regardless of whether you are using an iOS or Android mobile device, you can log in to the Linux servers through an SSH client, allowing you to manage your Linux servers anytime and anywhere. There are multiple SSH clients on the market for these two systems. Here we take Terminus and JuicySSH as examples.

Download SSH clients

iOS system: Download Termius-SSH client from the App Store and follow the prompts to register an account.
Android system: Download and install JuiceSSH.

Connect to Linux Servers

iOS operating system:
1. From the main page, click New Host.
2. Configure and save the following login information:
fiber_manual_record Hostname: The IP of the Linux server.
fiber_manual_record Use SSH: Enabled by default.
fiber_manual_record Port: The default port 22 or a custome one.
fiber_manual_recordUsername: The username to log in to the server。
fiber_manual_recordPassword: The password for the user。
3. On the Hosts page, select the server you just configured, and then click Continue in the pop-up window。
4. When you see this interface, you have successfully logged in to your Linux server.

Connect to Linux servers from iOS devices

Android operating system:
Follow the steps in the YouTube tutorial How to Use JuiceSSH to Connect to VPS Linux from the Android System.