Welcome, Guest. Please login or register.

Author Topic: Cisco configuration backup with SSH  (Read 3897 times)

argon80

  • Guest
Cisco configuration backup with SSH
« on: November 27, 2013, 09:17:32 AM »
Hi,
everyday i scheduled with crontab a discovery of my network and works perfectly.

Now i want to schedule a configuration backup of all my Cisco appliances (switch, asa etc)

I've tried with a single device on telnet and it works.

With ssh access Nedi fails to logon indeed it seems that don't even try.

All my switches have a ssh access only.

Test 1:
;usessh      always-known
;usessh      always

Nedi should try first the telnet access and in case of fail the SSH, true?
But with this configuration on the log i read

"DISC:Cli config = connection error on port 23"

Nedi never try an access with SSH on port 22

Test 2
usessh      always

Same result: NEdi try to access by telnet

"DISC:Cli config = connection error on port 23"

I've added the device to the "/.ssh/known_hosts" with the -vka option but don't works.


What am I doing wrong?



thanks,
Argon

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2687
    • View Profile
    • NeDi
Re: Cisco configuration backup with SSH
« Reply #1 on: November 28, 2013, 07:24:22 AM »
You may have to reset CLI access in Devices-Status and retry. If a connection on port 23 was successful, ssh won't be considered anymore...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

argon80

  • Guest
Re: Cisco configuration backup with SSH
« Reply #2 on: November 29, 2013, 09:56:33 AM »
You may have to reset CLI access in Devices-Status and retry. If a connection on port 23 was successful, ssh won't be considered anymore...

CLI access resetted but i get the same error: Nedi tries the telnet access only and fail.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2687
    • View Profile
    • NeDi
Re: Cisco configuration backup with SSH
« Reply #3 on: November 29, 2013, 11:57:05 AM »
Do you have the perl lib io-tty installed? You'll see it with nedi -v
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

argon80

  • Guest
Re: Cisco configuration backup with SSH
« Reply #4 on: December 03, 2013, 10:58:14 AM »
Do you have the perl lib io-tty installed? You'll see it with nedi -v

Lib missing. Now SSH access works.

I've a discovery scheduled every 12h. I can add a backup during a discovery with a simple change like this: from "nedi.pl -vpr" to "nedi.pl -vprB0"?

Thanks
Argon

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2687
    • View Profile
    • NeDi
Re: Cisco configuration backup with SSH
« Reply #5 on: December 05, 2013, 01:10:16 PM »
Yes, that works and keeps every backup as file...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo