diff options
author | Tar Committer <tar@ocjtech.us> | 2002-05-02 23:08:06 +0000 |
---|---|---|
committer | Tar Committer <tar@ocjtech.us> | 2002-05-02 23:08:06 +0000 |
commit | afcac75e572bcdd3cf269b921b7e8324aa5ffd4c (patch) | |
tree | dfffbfceb4f15c22781a599d6352586c8b7ce582 /bin/clogin.in | |
parent | 9f2402b0d86333f5f7e9d50437036cd3124bde47 (diff) | |
download | rancid-afcac75e572bcdd3cf269b921b7e8324aa5ffd4c.tar.gz rancid-afcac75e572bcdd3cf269b921b7e8324aa5ffd4c.tar.xz rancid-afcac75e572bcdd3cf269b921b7e8324aa5ffd4c.zip |
Imported from rancid-2.2.1.tar.gz.rancid-2.2.1
Diffstat (limited to 'bin/clogin.in')
-rwxr-xr-x | bin/clogin.in | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/clogin.in b/bin/clogin.in index afb18e3..9fff218 100755 --- a/bin/clogin.in +++ b/bin/clogin.in @@ -371,15 +371,13 @@ proc login { router user userpswd passwd enapasswd cmethod cyphertype } { send "no\r" send_user "\nError: The host key for $router has changed. Update the SSH known_hosts file accordingly.\n" return 1 } + -re "Offending key for .* \(yes\/no\)\?" { + send "no\r" + send_user "\nError: host key mismatch for $router. Update the SSH known_hosts file accordingly.\n" + return 1 } -re "(denied|Sorry)" { send_user "\nError: Check your passwd for $router\n" - if { $do_command || $do_script } { - send "exit\r" - wait - return 1 - } else { - return 1 - } + catch {close}; wait; return 1 } "Login failed" { send_user "\nError: Check your passwd for $router\n" |