How to transfer files between a Linux host and a Windows host

Source: Internet
Author: User
Tags command line ssh pscp ssh port ssh server linux

First download Pytty, decompression open found inside there are Plink.exe pscp.exe psftp.exe putty.exe Puttygen.exe Puttytel.exe, such as executable files, if just want to link the host to do some operations then use Putty.exe can be one, the specific use of the link given above, to upload the download file, then need to use Pscp.exe this file.

The following is a tutorial using the PSCP command to transfer files between Linux and Windows.

Through the command line into the Pscp.exe folder, direct input PSCP will see the following prompts:

PS: Recommend like me to add the Putty directory to the environment variable path, each time the province must enter the directory to transfer files.

The common command options are interpreted as follows:

-Q: Quiet mode, do not display anything when you transfer files, otherwise you will show the progress of file transfer

-P Port: Specify the SSH port for the server, note that this is uppercase P, the default is-P 22, if you have not repaired the host SSH Port 22, you do not have to specify the

-L User: Specifies which user's identity is logged on to the host, and the user name can be written with the host name, separated by @, for example: Username@server

-PW passwd: Specifies the password to use when logging on: passwd

-C: Express allow compression transmission, improve transmission speed

Give a few examples:

1, c:\>pscp-c c:\example.txt username@server:upload/

is to copy the local c:\example.txt to the upload subdirectory in the home directory of the user username on the host server (IP address or host name) (this may be/home/username/upload)

2, C:\>pscp-c c:\test.txt username@server:.

Copy the local C:\test.txt to the host server's user username's home directory (. Represents the current directory)

3, C:\>pscp-c username@server:*.tgz c:\download

Copy all *.tgz files from the user username home directory on the remote host server to the local c:\download directory, and the command will go wrong if the SSH version is SSH v1.

Precautions:

1. The above operation requires the input of the other host's password. Of course, from the above parameters can be seen, we can specify the password in advance, there is no need to enter the back.

For example: c:\>pscp-c-pw password c:\a.txt username@server:.

2. If you want to transfer to a different folder on your machine, you can select root users to avoid permissions

3. To ensure that Linux installed SSH server, if not, installation, will generally start automatically, if not started, start or restart SSH service (sudo/etc/init.d/ssh start/restart).

4. Do not execute the PSCP command in the Putty.exe, because the Putty.exe has been linked to the host, and then use the PSCP command or in the host's own folder copy, simply download the Windows machine.

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.