/usr/share/sadms-2.0.15/ssh-nopassword.expect is in sadms 2.0.15.repack-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # bbou@ac-toulouse.fr
# 2005-08-15 08:23:21
# expect-ssh-nopasswd
set HOST [lindex $argv 0]
set USER [lindex $argv 1]
set COMMAND [lindex $argv 2]
set timeout -1
log_user 0
spawn ssh -l $USER $HOST $COMMAND
expect {
"Enter passphrase for key"
{
close
wait
exit -1
}
"password:" {
close
wait
exit -1
}
"Password:" {
close
wait
exit -1
}
default {
log_user 1
send_user $expect_out(buffer)
}
}
set result [lindex [wait] 3]
if {$result} {
#puts -nonewline "$expect_out(buffer)"
exit $result
}
exit 0
|