Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Problems with Net::OpenSSH

by aeaton1843 (Acolyte)
on Nov 23, 2010 at 16:05 UTC ( #873240=note: print w/ replies, xml ) Need Help??


in reply to Re: Problems with Net::OpenSSH
in thread Problems with Net::OpenSSH

The hack works except that it doesn't return without issuing control-c. Is there some way around that? Part of the output follows.

andy@andy-desktop:~/core/arpinfo$ ./test3.pl ^C NetServ_Lab_SW_2#show ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet 4.2.4.1 - 0016.c859.1b41 ARPA Vlan42 Internet 192.168.120.1 - 0016.c859.1b42 ARPA Vlan499 ... ... NetServ_Lab_SW_2# NetServ_Lab_SW_2#andy@andy-desktop:~/core/arpinfo$


Comment on Re^2: Problems with Net::OpenSSH
Download Code
Re^3: Problems with Net::OpenSSH
by salva (Abbot) on Nov 23, 2010 at 17:27 UTC
    Is there any command you can send the remote box to close the session?

    For instance:

    my $out = $ssh->capture({stdin_data => "show ip arp\nexit\n"});

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873240]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2015-07-06 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls