banner



How To Download File From Linux Server To Windows

The mechanism of a estimator user accessing dissimilar directory files on different hd partitions is comparatively similar to how SSH is used to access remote machines existing under a common or different network.

[ You might as well similar: How to Disable SSH Login to Specific User in Linux ]

This network can exist public like the Cyberspace or private like LAN (Local Surface area Network) and SSH makes it possible for these machines to be accessible but what near downloading their associated files?

​Prerequisites

This commodity is for the Linux user on a desktop surround who wishes to access and download files on a remote Linux server environment via SSH.

You need to have authenticated access to these two Linux environments and some familiarity with the Linux command-line interface.

Basic Syntax of Using SSH with SCP Control

The SSH (Secure Crush) protocol is used to enable the SCP (Secure Copy) command to successfully reach specific file download objectives from a Linux server environment to a Linux desktop surroundings.

The standard syntax of using the SSH command with the SCP command looks like the following:

$ scp [email protected]_url_or_ip:/path/to/downloading/file/from/server /path/to/download/location/on/desktop        

Firstly, you lot should know the username and the IP address or hostname of the remote server from where you wish to remember a specific file.

Secondly, you should accurately specify the relative path to your download file location on the remote server and the relative path to the download file storage location on your desktop computer.

Create Files in Remote Linux Using SSH

You tin can achieve successful file downloads from a remote Linux server environment to a Linux desktop environs through iii techniques.

Before we reference the three SCP file download techniques, permit us offset have some files on our server that we wish to download. If these files already exist on your end, you are proficient to go. All y'all need is the files' correct relative path.

$ ssh [email protected]        

Create files on a remote Linux server.

$ touch LinuxShellTips_secrets.pdf && ls $ affect LinuxShellTips_certification.pdf && ls $ touch LinuxShellTips_for_beginners.pdf && ls        
Create Files in Remote Linux
Create Files in Remote Linux

Let's cheque out three ways to download files from a remote Linux server.

Download Remote Files Using SCP Control in Linux

In reference to the above syntax rule, we tin can download our first file with the following arroyo from your desktop environment.

$ scp [email protected]:/home/ec2-user/LinuxShellTips_secrets.pdf /home/dnyce/Desktop/files        

Check for the existence of the downloaded file:

$ cd /home/dnyce/Desktop/files && ls        
Download Remote Linux Files
Download Remote Linux Files

Download Remote Files with Port Number Using SCP Control in Linux

Peradventure y'all have defined a non-standard port or you want to use a standard port on your Linux server environs for treatment all remote file downloads. In this case, you should attach to the post-obit syntax rule:

$ scp -P port_number [email protected]_url_or_ip:/path/to/download/file/on/server /path/to/download/location/on/desktop        

Let us attempt to download the second file nosotros created:

$ scp -P 22 [email protected]:/domicile/ec2-user/ LinuxShellTips_certification.pdf /dwelling house/dnyce/Desktop/files        
Download Remote Linux Files with Port
Download Remote Linux Files with Port

From the look of things, the download was a success.

Download Remote Files with Private Key Using SCP Control in Linux

If the remote server y'all are using restricts y'all to a individual key/certificate for your remote connections, worry not. You can still achieve remote file download with the following syntax.

$ scp -i private_key/certificate_file.pem [electronic mail protected]_url_or_ip:/path/to/download/file/on/server /path/to/download/location/on/desktop        

Let us effort to download the third file we created using this arroyo.

$ scp -i my_file_name.pem [email protected]:/dwelling house/ec2-user/ LinuxShellTips_for_beginners.pdf /habitation/dnyce/Desktop/files        

Your concluding instance should be on the same path as this certificate file.

Download Remote Linux Files with Private Key
Download Remote Linux Files with Private Central

Finally, let usa check for the beingness of the three downloaded files:

$ cd /home/dnyce/Desktop/files && ls        
Verify Remote Download Files
Verify Remote Download Files

Past using a wild card (*), you could download all these files at once since they have a common file extension.

$ scp [email protected]:/home/ec2-user/*.pdf /home/dnyce/Desktop/files        

This tutorial has taught united states of america how to use SCP (Secure Copy) through the SSH protocol to accomplish specific file downloads from a remote server. The covered approaches are flexible enough to meet your remote files download needs.

Source: https://www.linuxshelltips.com/download-files-remote-linux-servers/

Posted by: wellerhatterouble1970.blogspot.com

0 Response to "How To Download File From Linux Server To Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel