Date: Wed, 12 Jun 2002 10:33:40 -0400 (EDT) From: Matt Piechota <piechota@argolis.org> To: Anthony Schneider <aschneid@mail.slc.edu> Cc: Peter Pentchev <roam@ringlet.net>, twig les <twigles@yahoo.com>, Jack Xiao <jack_xiao99@hotmail.com>, <freebsd-security@FreeBSD.ORG>, Lowell Gilbert <lowell@world.std.com>, "Mark S." <mark@furball.net>, Derek Ragona <derek@computinginnovations.com> Subject: Re: ssh questions Message-ID: <20020612102816.E36620-100000@cithaeron.argolis.org> In-Reply-To: <20020612141456.A18932@mail.slc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 12 Jun 2002, Anthony Schneider wrote: > I've never had a problem sending passphrases to ssh via expect, personally. This is a rather poorly written expect script that I use to tar up a cvs tree on a computer in a rather restrictive lab. It's biggest problem is the password is in the file, and shows up in the cron mail. It should be a decent start, and I should really get to reading that expect book I have. :) Check this: #!/usr/freeware/bin/expect -f set timeout 120 spawn /usr/local/bin/ssh piechota@fsmvpn2 expect "password" send "xxxx\r" expect "(~)%" send "rm -f bdf.tar\r" expect "(~)%" send "cd /home/cvs\r" expect "(/home/cvs)%" send "tar cvf /home/piechota/bdf.tar bdf\r" expect "(/home/cvs)%" send "exit\r" set timeout 900 spawn /usr/local/bin/scp piechota@fsmvpn2:/home/piechota/bdf.tar fsmcvs.tar expect "password" send "xxxx\r" expect "100%" send "expect done\r" -- Matt Piechota To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020612102816.E36620-100000>