ITerm using expect to implement automatic remote login, log on the springboard machine

Source: Internet
Author: User
#!/usr/bin/expectset timeout 10spawn ssh-p [lindex $argv 0] [lindex $argv 1]@[lindex $argv 2]expect {        "(yes/no)?"        {send "yes\n"; exp_continue}        "Password:"        {send "<password>\n"}}expect "*< server name >*" {send "ssh [lindex $argv 3]@[lindex $argv 4]\n "}expect" *password: "{send" [lindex $argv 5]\n "} #expect eofinteract

Use Iterm to connect to server on Mac, can't save password, implement automatic password input by expect script

General company only through the springboard machine login, through the above script can achieve continuous login, specific iterm configuration reference online Other tutorials

More complex automated operations can also be achieved through the expect script

Reference:

http://blog.csdn.net/leexide/article/details/17485451

http://blog.csdn.net/ofengyajie/article/details/17840751

ITerm using expect to implement automatic remote login, log on the springboard machine

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.