I assume you can do this manually with 'ssh'. In that case you might want to try Expect, to handle talking to 'ssh' from perl.
Update: a good tutorial: Using Expect.pm to Manage an Unreliable Program
In reply to Re: Problem in enabling authentication after logging in to a firewall
by eXile
in thread Problem in enabling authentication after logging in to a firewall
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |