#!/usr/bin/env expect
-# @(#) $Id: ./src/agentlessd/scripts/ssh.exp, 2011/09/08 dcid Exp $
-
# Agentless monitoring
#
# Copyright (C) 2009 Trend Micro Inc.
# All rights reserved.
-#
+#
# This program is a free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License (version 2) as published by the FSF - Free Software
# Foundation.
-
if {[string compare $pass "NOPASS"] == 0} {
source $sshnopasssrc
return
}
-
expect {
"WARNING: REMOTE HOST" {
send_user "\nERROR: RSA host key for '$hostname' has changed. Unable to access.\n"
}
"*sure you want to continue connecting*" {
send "yes\r"
- expect "* password:*" {
+ expect "*assword:*" {
send "$pass\r"
source $sshloginsrc
}
send_user "\nERROR: Unable to connect to remote host: $hostname .\n"
exit 1;
}
- "* password:*" {
+ "*assword:*" {
send "$pass\r"
source $sshloginsrc
}