FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


Sidebar


Top     SiteMap

Manager Server

Target Server

$FHHOME/bin/xxx.sh | xxxx.exp













.

fhscripts:check:check_loginpass.exp.html



FastHandle Scripts

Expect to Check Login Passowrd with one-line

$FHHOME/bin/check_loginpass.exp



check_loginpass.exp

$FHHOME/bin/check_loginpass.exp

#!/usr/bin/expect
#########################################################
#./check_loginpass.exp  $IP $USER '$PASS'
#
#########################################################

set IP  [lindex $argv 0]
set USER [lindex $argv 1]
set PASS [lindex $argv 2]


spawn ssh $USER@$IP

expect "password: "
send "$PASS\r"

expect "$ "
send "LANG=C date\r"

expect "$ "
send "exit\r"


exit 0








FastHandle Scripts



fhscripts/check/check_loginpass.exp.html.txt ยท Last modified: 2018/03/29 00:05 by kurihara