Step 0
Both this machine and the target machine need to be installed with Openssh-server
Execute as root on native and target
Service SSH Status # Debian is sshd on Ssh,opensuse, you can click the TAB key immediately after typing SSH to automatically complete the Service name # or service--status-all | grep SSH # Universal
To see if the SSH service is started
Step 1
Executing on the target host
IP Address
To view its IP address
Step 2
Perform on this machine
Scp-q-R Remote_ip_address:filepath Local_path # FILEPATH is the absolute path to the file on the other host that you want to download scp-q-R [email protected]_ip_address: FILEPATH Local_path # User is the owner name of the file you want to download, FILEPATH is the absolute path or relative path of the file you want to download on the other host
To connect to the target machine and download the specified file to the native. You need to enter the password of the owner of the file on the target computer when connecting.
The remote_ip_address is the IP address of the other person through step 1, filepath is the path to the file on the other host that you want to download, and Local_path is where you want to save it on your computer.
Instead of using the- r parameter when downloading a single file, the- r parameter is required to download the entire folder. The-q parameter is used to turn on quiet mode to suppress redundant output information.
Demo diagram
Target machine: Debian
This machine: OpenSUSE
Download files from other Linux hosts within the LAN