Of course, this is the simplest operation demonstration. you can also use shell scripts and reverse Ct scripts based on your actual tasks, which will greatly save the intermediate process time.
Use the verify Ct script to complete ssh to perform password operations on two different computers:
Server terminal: username,
Debian terminal: username: wr-physics, ip: xx. xxx
1. first on the server terminal:
$ Mkdirexpect-test
$ Cdexpect-test
2. create a debian terminal to receive the trusted Ct script
$ Viloop1andinput
#! /Usr/bin/CT
Setpassword ******
Spawnscp-rwr-physics@xx.xxx.xxx.xxx:/home/wr-physics/wr/Al/test ./
Country CT-nocase "password :"
Send "$ password \ r"
Expecteof
$ Andchmod + xloop1
3. create an audit Ct script to send test to debian terminal from the server terminal
#! /Usr/bin/CT
Setpassword841219
Spawnscp-rtestwr-physics@xx.xxx.xxx.xxx:/home/wr-physics/wr/Al/
Country CT-nocase "password :"
Send "$ password \ r"
Expecteof
$ Andchmod + xloop2
4. create a shell script for server terminal computing
$ Viloopandinput
#! /Bin/sh
./Loop1
Cdtest
Command
Cd ..
./Loop2
$ Andchmod + xloop
$./Loop
Of course, this is the simplest operation demonstration. you can also use shell scripts and reverse Ct scripts based on your actual tasks, which will greatly save the intermediate process time.