Re: password on command line, or other options?
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 user@host
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
Relevant Pages
- insecure tmp file creation in ksh93 port
... for a client when I saw the following ... cat> /tmp/file$$ <<! ... chmod 755 /tmp/file$$ ... (FreeBSD-Security) - Re: open() and ESTALE error
... And I didn't mean an operation with a file opened on the client. ... cat 1 <--- ENOENT here ... (freebsd-hackers) - Re: /dev/dsk/c0d0s0 write-protected, cannot mount RW
... the mouse thing puzzles me. ... mouse works without doing that cat on the device if ACPI is disabled. ... I have to chmod a+w the device to get it to mount RW. ... (comp.unix.solaris) - netcat as server, answers client inconsistently
... I'm trying to make netcat behave as a simple server, ... boomerangs the text back to that client machine. ... "cat" with anything else (e.g., a tr command to do character ... Listening on any address 5555 ... (comp.os.linux.networking) - Re: Sad...
... printed-quotable encoding really, really, really badly. ... So, I guess that leads me to the only logical conclusion I can come to, and this is that your end has nothing to do with the situation and it must be my lousy email client. ... Sorry, CaT. ... The HTML side displays well because ... (Debian-User) |
|