The trusted CT command in shell often needs to jump to different machines, but it is very complicated to input the password every time. Naturally, I thought of the trusted CT command in shell. This command is just a little bit of knowledge, probably it is to judge the output of the terminal and then perform automatic input. find it on the internet... the trusted CT command in shell often needs to jump to different machines, but it is very complicated to input the password every time. Naturally, I thought of the trusted CT command in shell. This command is just a little bit of knowledge, probably it is to judge the output of the terminal and then perform automatic input. find an example on the internet and write the following code: www.2cto.com 1 #! /Usr/bin/expect2spawn ssh-l root 172.27.19.133366ct "Password:" 4 send "gavinwen" 5 interact www.2cto.com but it does not take effect when running. you must enter the Password manually, later I found on osc that it should match 1 #! /Usr/bin/expect2spawn ssh-l root 172.27.19.133366ct "Password:" 4 send "gavinwen \ r" \ r after 5interact cannot be lost ~~
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