Plink and PSCP commands (log in to Linux and execute command/linux and Windows Server file copy)

Source: Internet
Author: User
Tags file copy pscp

Tag: ber number upload cal lang address user font LSP

1. Use the Plink.exe provided by Putty to log on to a machine and execute the command, and close it yourself when done

The contents of the bat file are as follows:

D:\Download\Software\putty-0.60\plink.exe -PW jointforce2004 [email protected]192. 168. 0.1  " /root/testconn.sh; Getkey "               

The command is to log on to the 192.168.0.1, execute the command:/root/testconn.sh; Getkey, and then exit automatically.

Linux getkey This command waits for the user to enter, then echoes back the characters entered by the user, and then the command exits. Here to use this command to stop the window, after reading casually knocked down the keyboard plink on the exit, because all the commands have been executed.

2. upload and download Linux files using the Pscp.exe command provided by Putty:

Command format: PSCP localfile [Email protected]:/filedirectory
Copy entire folder: Pscp-r localdir [Email protected]:/filedirectory

Note: If you copy files from Linux, it is the same method, just to swap the front and back addresses;


Example 1: For example I want to copy all the files under Windows E:\HTK the entire directory to the Linux/root directory, the command is as follows:

1234567890 e:\htk 192.168.0.204:/root
Description
-R Copy all files under directory;
-L user name (root) of the other machine (Linux);
-PW password (1234567890);
E:\HTK the address of the source file/folder
192.168.0.204:/root the address of the destination file/folder.
192.168.0.204 is the IP address of the Linux machine.

Example 2: In turn, transfer the Test.txt file under the Linux SOUNDRCG directory to Windows E:\, as well as typing the command on the Windows command line:

1234567890 192.168.0.204:/soundRcg/test.txt E:\

3. putty:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Plink and PSCP commands (log in to Linux and execute command/linux and Windows Server file copy)

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.