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



This is an old revision of the document!


check_loginpass.sh

#!/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



fhscripts/check/check_loginpass.exp.html.1510584996.txt.gz ยท Last modified: 2017/11/13 23:56 by kurihara