/usr/share/sadms-2.0.15/keygen.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 | # bbou@ac-toulouse.fr
# 2005-08-15 08:23:21
# expect-keygen
set KEY [lindex $argv 0]
set PASSPHRASE [lindex $argv 1]
#send_user "The password for key: "
#stty -echo
#expect_user -re "(.*)\n" {set PASSPHRASE $expect_out(1,string)}
#send_user "\n"
#stty echo
set timeout -1
log_user 0
spawn ssh-keygen -t dsa -f $KEY
expect {
"Overwrite (y/n)?" {
send "y\n"
exp_continue
}
"Enter passphrase (empty for no passphrase):" {
send "$PASSPHRASE\n"
exp_continue
}
"Enter same passphrase again:" {
send "$PASSPHRASE\n"
}
}
log_user 0
set r "\[0-9a-f:\]+"
expect -re "The key fingerprint is:\r\n(${r})" { log_user 1;send_user "$expect_out(1,string)\n" }
|