Operations 6 min read

How to Seamlessly Connect Windows or Ubuntu to a Remote Linux Server

This guide walks you through setting up Xshell on Windows, installing OpenSSH on Ubuntu, configuring SSH sessions, and using lrzsz or scp for reliable file transfers between local machines and remote Linux servers.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Seamlessly Connect Windows or Ubuntu to a Remote Linux Server

When experiments need to run on a workstation, constantly moving external drives between a personal computer and the workstation is inefficient. This article provides a step‑by‑step tutorial for remote access to Linux servers from both Windows and Ubuntu environments.

Prerequisites

Download and install Xshell (choose the free student/educational version).

On the Ubuntu host, install openssh-server using sudo apt-get install openssh-server and ensure the SSH service is running (e.g., ps -e | grep ssh).

Keep the server powered on 24/7 to avoid restarting SSH each time.

Connecting from Windows with Xshell

Open Xshell, create a new session, enter the Ubuntu machine’s IP, select the SSH protocol, and use port 22. After confirming, you will be prompted for a username and password; you can opt to save these credentials for future connections.

Once connected, you have a terminal session on the Ubuntu system, enabling command‑line operations directly.

File Transfer Methods

The most critical part is moving data to and from the server. Besides graphical tools like FileZilla, the article recommends using the lrzsz package, which provides rz (upload) and sz (download) commands. sudo apt-get install lrzsz To upload a file from Windows, run rz in the Xshell terminal and select the file. To download, use sz filename, which prompts you to choose a local save location.

Connecting from Ubuntu to a Remote Linux Server

Ensure the remote server also has openssh-server installed. Edit /etc/ssh/sshd_config to set PermitRootLogin yes and restart the service with service sshd restart.

Then, from Ubuntu, connect via: ssh rootusername@IP Replace rootusername and IP with your server’s credentials.

Uploading Files

scp filename rootusername@IP:/tmp

Files are placed in /tmp due to permission constraints; you can later move them to the desired directory.

Downloading Files

scp rootusername@IP:/home/a.tar.tz .
scp -r rootusername@IP:/home/* ./

These commands are executed on the local machine’s terminal.

Overall, the guide offers a practical workflow for remote SSH access and efficient file transfer, suitable for researchers and developers who need to manage data on remote Linux servers without physical media.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

SSHUbuntuXshellscplrzsz
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.