There are several ways to copy files from the window system to a Linux system, such as sharing files on Windows, mount to Linux locally via the CIFS protocol, and then CP. or through FTP, but that's a bit of a hassle. We know that there is a command SCP under Linux, which can be used to quickly copy files between Linux systems, the previous question is the SSH service that is opened on Linux, which Windows have such commands. I searched the information and found no. But there is a tool WINSCP can be implemented, however, it is a Windows interface, for those who like to use the script management, may prefer the command line, then, there is no such tool, the answer is yes, that is PSCP, pscp is a remote file transfer tool with Putty, similar to the Linux under SCP command,
Http://the.earth.li/~sgtatham/putty/latest/x86/pscp.exe
Official website: http://www.putty.org/
I am used to putting pscp.exe under C:\windows\system32 so that it is convenient to call at any time. The use of PSCP is simple, note that Linux to open SSH
1. Copy a single file from the local widows host to the TMP directory of the remote Linux
PSCP LocalFile [Email protected]:/tmp/
2. Copy the folder from the local window system and the following files to the/tmp directory of the remote Linux host 192.168.11.213
Pscp-r E:\tempdir [Email protected]:/tmp/
[email protected] ' s password:
Dd.txt | 0 KB | 0.0 kb/s | eta:00:00:00 | 100%
3. Copy files from the remote Linux host to the current directory of the local window system
PSCP [email protected]:/var/log/yum.log./
[email protected] ' s password:
Yum.log | 1 KB | 1.4 kb/s | eta:00:00:00 | 100%
4. Replicating directories from a remote Linux host to a local Windows-specified directory
pscp-r [Email Protected]:/tmp/tempdir "F:\ABC"
[email protected] ' s password:
Dd.txt | 0 KB | 0.0 kb/s | eta:00:00:00 | 100%
5, can also specify the user and password way, applies to the Script batch processing
Pscp-r-L ROOT-PW root_password 192.168.11.213:/tmp/tempdir "f:\
A
Dd.txt | 0 KB | 0.0 kb/s | eta:00:00:00 | 100%
More options to find help
USAGE:PSCP [Options] [[Email Protected]]host:source target
PSCP [options] source [source ...] [[Email Protected]]host:target
PSCP [Options]-ls [[Email Protected]]host:filespec
Options:
-V Print version information and exit
-PGPFP print PGP key fingerprints and exit
-P Preserve File attributes
-Q Quiet, don ' t show statistics
-R Copy Directories recursively
-V Show verbose messages
-load sessname load settings from saved session
-p Port Connect to specified port//specify Port
-l user connect with specified username
-PW PASSW Login with specified password
-1-2 force use of particular SSH protocol version
-4-6 force use of IPv4 or IPV6
-C Enable compression
-I key private key file for authentication
-noagent Disable use of pageant
-agent Enable use of pageant
-batch Disable all interactive prompts
-unsafe allow Server-side wildcards (dangerous)
-sftp Force use of SFTP protocol
-SCP Force use of SCP protocol
This article from "Line think-not to" blog, reprint please contact the author!
How to copy files from the window system to a remote Linux system