Hi
Here is something that seems to work
You need 2 scripts. a .sh and a .pl (perl and shell)
$ cat echo_pass
#!/bin/sh
echo p4ssword
$ chmod a+rx echo_pass
$ cat setsid.pl
#!/usr/bin/perl
use POSIX(setsid);
if(fork()) { wait; } else { setsid; exec {$ARGV[0]} @ARGV; }
$ chmod a+rx setsid.pl
$ DISPLAY=y SSH_ASKPASS=./echo_pass ./setsid.pl ssh [EMAIL PROTECTED]
ssh should use echo_pass when is prompted for password
catam
On Sun, 29 Jan 2006, Michael W. Lucas wrote:
Hi,
I have a client who is using rsh with ciscoconf
(http://sourceforge.net/project/showfiles.php?group_id=25401&package_id=31646)
on FreeBSD to create and keep RCS logs of his router and switch
configurations.
I'd like to replace rsh with ssh.
Ciscoconfd will let me execute an arbitrary configuration-retrieval
program instead of rsh. The trick is, how to get ssh to work
non-interactively with a Cisco device. It seems that Cisco won't
support an authorized_keys mechanism for a user, so I have to somehow
get a Unix-ish SSH client that will support using a password on the
command line.
Any suggestions out there? Surely someone has already done this?
Thanks,
==ml