When transferring files from windows to Linux, after OpenSSH is installed, use the SCP command in cmd. You need to enter the password after executing the command so that it cannot be called in the program. Batch processing is not very familiar. After finding some information on the Internet, the result is as follows: Because the RunAs command is similar, this is generally used on the Internet as an example.
1. http://www.cn-dos.net/forum/viewthread.php? Tid = 34574
Method 1: Use sendkeys of vbs to enter the password <br/> echo set PWS = wscript. createobject ("wscript. shell ")> % Temp %/PWS. vbs <br/> echo PWS. sendkeys "1 {enter}" >>% TEMP %/PWS. vbs <br/> wscript % Temp %/PWS. vbs & RunAs/u: test1 cmd.exe <br/> Method 2: Use the/savecred parameter <br/> creden must be created for the first time when an independent user executes a program, in the meantime, the password will not be displayed again. You cannot see it. If you lose the password, press Enter. <Br/> in the future, you do not need to enter a password. <Br/> RunAs/u: test1 cmd.exe enter the password and press ENTER <br/> RunAs/savecred/u: test1 explorer no longer need to enter the password <br/> method 3: replace RunAs with runtime xec in pstools
2. A vbs example
Http://www.cn-dos.net/forum/viewthread.php? Tid = 29795 & fpage = 5
3. Some people claim to write the password to another file, which can be solved through redirection. However, no one confirmed the success.
Http://topic.csdn.net/t/20060504/23/4730647.html
Some people say that the echo. psw | method cannot be used. "The echo method is only valid for standard streams. If it is a program that uses BIOS programming to detect the keyboard, there will be no way ."
Vbs is successful, but a disgusting dialog box is displayed every time you run vbs: Click OK to try again or enter an alternate path to a folder containing the installation package PDF. MSI in the box. I don't know how to solve this problem.
Write down the record for the moment. Wait for a good time to learn the batch processing and then look at the redirection method.