Compile the Linux automated interactive login script with objective CT
Source: Internet
Author: User
Compile the Linux automated interactive login script with login Ct # All server names, usernames, and passwords in this article are not authentic. What is reverse CT is a language that breaks through the limitations that shell cannot interact automatically. Code above: the goto file, used to simplify logon for a long time... compile the Linux automated interactive login script with login Ct # All server names, usernames, and passwords in this article are not authentic. What is reverse CT is a language that breaks through the limitations that shell cannot interact automatically. Go to the code: goto file, which is used to simplify the steps of a server with a long name and which is not easy to manage. The front is a switch, followed by interactive code. you can automatically enter the password to automatically enter the desired directory. [Plain] #! /Home/users/liuzuocheng/local/tcl/bin/precise CT-f set server [lindex $ argv 0] switch-exact -- $ server {web00 {set user zuocheng set host di.ba.dd.web00.outserver.csdn.set password 123456} web01 {set user zuocheng set host di.ba.dd.web01.outserver.csdn.net set password 123456} default {puts "Please input an avalible server. \ r "exit} set timeout 3 spawn ssh $ user @ $ host reset CT "? Assword: * "send" $ password \ r "wrong CT" \ $ "send" cd/home/zuocheng \ r "interact how to use it? Terminal input: $ goto web00 and then automatically log on to di.ba.dd.web00.outserver.csdn.net
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