[TriLUG] a perl/expect/IOS question

Brian Weaver cmdrclueless at gmail.com
Thu Feb 23 15:12:51 EST 2012


Have you tried

$configLine = "tacacs-server key 7 " . $tacacsKey;

or

$configLine = "tacacs-server key 7 $tacacsKey";

-- Brian

On Thu, Feb 23, 2012 at 2:47 PM, Greg Brown <gwbrown1 at gmail.com> wrote:
> I have an encrypted tacacs key that I extract out of a router and I place
> that key onto the line "tacacs-server key 7 $tacacsKey" using join.  The
> actual line is my $configLine=join(' ',"tacacs-server key 7",$tacacsKey);
>
>  I can copy and past that line manually into the cisco router and the
> router accepts the key.  If my script tries to do the same I get an invalid
> key error.
>
> I think I might have a control character stuck in there but I'm starting to
> doubt it.  I can 'od -c' the string and it looks ok but the key will fail
> within the script ever time throwing back "%Invalid encrypted key" every
> time.
>
> So, in summary, cut and past the line by hand with the encrypted key and
> the router accepts it.  Try the same using Net::SSH::Expect and it fails.
>
> Ideas?  I don't have any at this point.
>
> Greg
> --
> This message was sent to: cmdrclueless at gmail.com <cmdrclueless at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  : http://www.trilug.org/mailman/options/trilug/cmdrclueless%40gmail.com
> TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions



-- 

/* insert witty comment here */



More information about the TriLUG mailing list