Menu

SSHv1 support requested for ciscoscraper.pl

2013-04-30
2013-06-03
  • Ryan Mahoney

    Ryan Mahoney - 2013-04-30

    Jonathan - I've got a number of Cisco IOS devices that only accept SSHv1 connections and are currently not being scraped due to lack of SSHv1 support with ciscoscraper.pl

    I've tried modifying the ciscoscraper.pl scraper to leverage the SSHv1 support you implemented in the catosscraper.pl scraper, but I'm hitting a wall. Would you have time to review the attached file - or just modify the ciscoscraper.pl from scratch so that it will allow me to flag records with a 'forcesshv1'.

    Here is the output I get when trying to test the attached scraper:
    netdbadmin@netdb:/opt/netdb/netdbscraper$ sudo -u netdb netdbctl -ud -v -conf /etc/netdb_debug.conf -m -a -debug 4
    Tue Apr 30 01:51:10 2013: netdbctl(20882): NetDB Debug Level: 4
    Tue Apr 30 01:51:10 2013: netdbctl(20882): Parsing Devices from Big Brother (optional)
    Tue Apr 30 01:51:10 2013: netdbctl(20882): Running netdbscraper on devices
    Tue Apr 30 01:51:10 2013: netdbctl(20882): Helper Debug: Loading Alternate Config File: /etc/netdb_debug.conf
    Tue Apr 30 01:51:10 2013: netdbctl(20882): netdbscraper.pl(20885): Parent spawning 10 processes with 2.0s delay
    Tue Apr 30 01:51:10 2013: netdbctl(20882): Device: ciscosshv1device, fqdn: ciscosshv1device.local, mac: 1, arp: 1, vrfs: , ipv6: , devtype:
    Tue Apr 30 01:51:10 2013: netdbctl(20882): Device: ciscosshv1device, fqdn: ciscosshv1device.local, mac: 1, arp: 1, vrfs: , ipv6: , devtype:
    Tue Apr 30 01:51:10 2013: netdbctl(20882): netdbscraper.pl(20886): Child executing: /opt/netdb/netdbscraper/iosscraper.pl -debug 4 -d ciscosshv1device.local,arp,forcesshv1,devtype=ios -conf /etc/netdb_debug.conf -pn
    Tue Apr 30 01:51:11 2013: netdbctl(20882): Helper Debug: Loading Alternate Config File: /etc/netdb_debug.conf
    Tue Apr 30 01:51:11 2013: netdbctl(20882): Device: ciscosshv1device, fqdn: ciscosshv1device.local, mac: 1, arp: 1, vrfs: , ipv6: , devtype: ios
    Tue Apr 30 01:51:11 2013: netdbctl(20882): iosscraper.pl(20887): Connecting to device ciscosshv1device.local
    Tue Apr 30 01:51:11 2013: netdbctl(20882): iosscraper.pl(20887): Connecting to ciscosshv1device.local using SSH(1) Telnet(1)...
    Tue Apr 30 01:51:11 2013: netdbctl(20882): IP for ciscosshv1device.local: 10.1.101.58
    Tue Apr 30 01:51:11 2013: netdbctl(20882): iosscraper.pl(20887): Testing port 22 on ciscosshv1device.local for open state
    Tue Apr 30 01:51:11 2013: netdbctl(20882): iosscraper.pl(20887): ciscosshv1device.local SSH port open
    Tue Apr 30 01:51:11 2013: netdbctl(20882): SSH: Logging in to ciscosshv1device.local (timeout: 10)
    Tue Apr 30 01:51:11 2013: netdbctl(20882): iosscraper.pl(20887): |ERROR|: Could not open SSH session to ciscosshv1device.local:
    Tue Apr 30 01:51:11 2013: netdbctl(20882): Authentication Error: Primary login failed and no secondary login credentials provided
    Tue Apr 30 01:51:11 2013: netdbctl(20882): at /opt/netdb/netdbscraper/iosscraper.pl line 321
    Tue Apr 30 01:51:11 2013: netdbctl(20882): netdbscraper.pl(20885): Parent waiting on final processes to finish: 0
    Tue Apr 30 01:51:11 2013: netdbctl(20882): netdbscraper.pl(20885): Parent Complete
    Tue Apr 30 01:51:11 2013: netdbctl(20882): Importing 1 intstatus entries in to switchstatus table
    Tue Apr 30 01:51:12 2013: netdbctl(20882): NetDB Library Debug Level: 1
    Tue Apr 30 01:51:12 2013: netdbctl(20882): DEBUG: Loading Int Status in to hash
    Tue Apr 30 01:51:12 2013: netdbctl(20882): updatenetdb: Load Status Table rejected # NetDB Interface Status Data: (switch,port,status,vlan,description,speed,duplex)
    Tue Apr 30 01:51:12 2013: netdbctl(20882): DEBUG: Second Entry:
    Tue Apr 30 01:51:12 2013: netdbctl(20882): Switch Status Table Empty, nothing to import
    Tue Apr 30 01:51:12 2013: netdbctl(20882): Importing 1 MAC entries in to switchports table
    Tue Apr 30 01:51:12 2013: netdbctl(20882): NetDB Library Debug Level: 1
    Tue Apr 30 01:51:12 2013: netdbctl(20882): DEBUG: Loading Mac Table in to hash
    Tue Apr 30 01:51:12 2013: netdbctl(20882): updatenetdb: Load MAC Table rejected # NetDB Mac Table Data: (switch,mac,port)
    Tue Apr 30 01:51:12 2013: netdbctl(20882): DEBUG: Second Entry:
    Tue Apr 30 01:51:12 2013: netdbctl(20882): MAC Table Empty, nothing to import
    Tue Apr 30 01:51:12 2013: netdbctl(20882): Importing 1 ARP Entries in to ipmac table
    Tue Apr 30 01:51:13 2013: netdbctl(20882): NetDB Library Debug Level: 1
    Tue Apr 30 01:51:13 2013: netdbctl(20882): DEBUG: Loading Arp Table in to hash
    Tue Apr 30 01:51:13 2013: netdbctl(20882): DEBUG: Second Entry:
    Tue Apr 30 01:51:13 2013: netdbctl(20882): ARP Table Empty, nothing to import
    Tue Apr 30 01:51:13 2013: netdbctl(20882): NetDB update complete

     
  • Ryan Mahoney

    Ryan Mahoney - 2013-04-30

    Attachment

     
  • Ryan Mahoney

    Ryan Mahoney - 2013-05-10

    Any chance you could consider providing the requested SSHv1 support?

     
  • Jonathan Yantis

    Jonathan Yantis - 2013-05-15

    Ryan,

    I've been out of town for a couple weeks, but I'll try to see what I can do later this week when I catch up.

    Jonathan

     
  • Jonathan Yantis

    Jonathan Yantis - 2013-05-20

    Ryan,

    Give this code a shot. In the future I really need to create a flag to allow sshv1 in the mainline scraper, but let me know if this works:

    https://sourceforge.net/p/netdbtracking/code/HEAD/tree/trunk/netdbscraper/sshv1scraper.pl

    Set the devtype to sshv1 and give it a shot.

    Jonathan

     
  • Ryan Mahoney

    Ryan Mahoney - 2013-06-03

    Jonathan - I just noticed your response... I will try it today! Thanks --Ryan

     
  • Ryan Mahoney

    Ryan Mahoney - 2013-06-03

    The scraper throws the following error:

    netdbadmin@netdb:/opt/netdb/netdbscraper$ sudo -u netdb ./sshv1scraper.pl -d mysshv1switch.local -om /tmp/mac.txt -oi /tmp/int.txt -debug 5
    Helper Debug: Loading Alternate Config File: /etc/netdb.conf
    Device: mysshv1switch, fqdn: mysshv1switch.local, mac: 1, arp: , vrfs: , ipv6: , devtype:
    iosscraper.pl(21317): Connecting to device mysshv1switch.local
    iosscraper.pl(21317): Connecting to mysshv1switch.local using SSH(1) Telnet(1)...
    Undefined subroutine &main::getIPfromName called at ./sshv1scraper.pl line 279.
    netdbadmin@netdb:/opt/netdb/netdbscraper$

     

Log in to post a comment.