cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1412
Views
0
Helpful
5
Replies
little-fingers
Beginner

Issue with CONFIG-COPY-MIB

Hello community,

I am trying to use the config copy mib for conf updates. While it works great using tftp, I have an issue with scp and I fail to see where I am wrong. From CLI, both TFTP and SCP do work as expected.

Hardware is 2960X running 15.0(2)EX5

 

Working TFTP test:

 

ccopy@syslog:~ % cat /tftpboot/test.conf
int lo6
description test-conf-copy-mib-TFTP
end

 

ccopy@syslog:~ % ./confcopy tftp
CISCO-CONFIG-COPY-MIB::ccCopyProtocol.88912 = INTEGER: tftp(1)
CISCO-CONFIG-COPY-MIB::ccCopySourceFileType.88912 = INTEGER: networkFile(1)
CISCO-CONFIG-COPY-MIB::ccCopyDestFileType.88912 = INTEGER: runningConfig(4)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddress.88912 = IpAddress: A.B.C.D
CISCO-CONFIG-COPY-MIB::ccCopyFileName.88912 = STRING: test.conf
CISCO-CONFIG-COPY-MIB::ccCopyUserName.88912 = STRING: ccopy
CISCO-CONFIG-COPY-MIB::ccCopyUserPassword.88912 = STRING:
CISCO-CONFIG-COPY-MIB::ccCopyNotificationOnCompletion.88912 = INTEGER: false(2)
CISCO-CONFIG-COPY-MIB::ccCopyState.88912 = INTEGER: successful(3)
CISCO-CONFIG-COPY-MIB::ccCopyTimeStarted.88912 = Timeticks: (1728626846) 200 days, 1:44:28.46
CISCO-CONFIG-COPY-MIB::ccCopyTimeCompleted.88912 = Timeticks: (1728627647) 200 days, 1:44:36.47
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.88912 = INTEGER: active(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressType.88912 = INTEGER: ipv4(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressRev1.88912 = STRING: "A.B.C.D"
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.88912 = INTEGER: destroy(6)

 

ccopy@syslog:~ % snmpwalk -v2c -c c0mUn1tY X.Y.Z.T ifName | grep Lo
IF-MIB::ifName.14067 = STRING: Lo6
ccopy@syslog:~ % snmpwalk -v2c -c c0mUn1tY X.Y.Z.T ifAlias | grep copy-mib
IF-MIB::ifAlias.14067 = STRING: test-conf-copy-mib-TFTP


log on switch:

Jun 26 12:46:29.328: %SYS-5-CONFIG_I: Configured from tftp://A.B.C.D/test.conf by console
Jun 26 12:46:31.328: %LINK-3-UPDOWN: Interface Loopback6, changed state to up
Jun 26 12:46:32.338: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback6, changed state to up


Doing the same with SCP ends in error. SCP transfer to running works with the CLI


ccopy@syslog:~ % cat test.conf
int lo7
description test-conf-copy-mib-SCP
end

 

ccopy@syslog:~ % ./confcopy scp
CISCO-CONFIG-COPY-MIB::ccCopyProtocol.88971 = INTEGER: scp(4)
CISCO-CONFIG-COPY-MIB::ccCopySourceFileType.88971 = INTEGER: networkFile(1)
CISCO-CONFIG-COPY-MIB::ccCopyDestFileType.88971 = INTEGER: runningConfig(4)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddress.88971 = IpAddress: A.B.C.D
CISCO-CONFIG-COPY-MIB::ccCopyFileName.88971 = STRING: test.conf
CISCO-CONFIG-COPY-MIB::ccCopyUserName.88971 = STRING: ccopy
CISCO-CONFIG-COPY-MIB::ccCopyUserPassword.88971 = STRING:
CISCO-CONFIG-COPY-MIB::ccCopyNotificationOnCompletion.88971 = INTEGER: false(2)
CISCO-CONFIG-COPY-MIB::ccCopyState.88971 = INTEGER: failed(4) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
CISCO-CONFIG-COPY-MIB::ccCopyTimeStarted.88971 = Timeticks: (1728676853) 200 days, 1:52:48.53
CISCO-CONFIG-COPY-MIB::ccCopyTimeCompleted.88971 = Timeticks: (1728676869) 200 days, 1:52:48.69
CISCO-CONFIG-COPY-MIB::ccCopyFailCause.88971 = INTEGER: badFileName(2) <<<<<<<<<<<<<<<<<<<<
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.88971 = INTEGER: active(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressType.88971 = INTEGER: ipv4(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressRev1.88971 = STRING: "A.B.C.D"
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.88971 = INTEGER: destroy(6)
ccopy@syslog:~ %


SWITCH#sh int desc | i SCP
SWITCH#
SWITCH#copy scp://ccopy@A.B.C.D/test.conf running-config
Destination filename [running-config]?

Password for ccopy@syslog:
Sending file modes: C0644 47 test.conf
!
47 bytes copied in 6.407 secs (7 bytes/sec)
SWITCH#
Jun 26 12:55:54.439: %SYS-5-CONFIG_I: Configured from scp://ccopy@A.B.C.D/test.conf by cisco on vty0 (A.B.C.D)
Jun 26 12:55:55.443: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback7, changed state to up
SWITCH#sh int desc | i SCP
Lo7 up up test-conf-copy-mib-SCP
SWITCH#

 

Well... I am a bit puzzled. If someone can shed some light on this, it would be very appreciated :-)

2 ACCEPTED SOLUTIONS

Accepted Solutions
marce1000
VIP Advisor

 

 - Check and or turn on verbose logging for the remote sshd-server, then see what is reported when  you try confcopy with the scp protocol

 M.

View solution in original post

Hello,

Thanks for looking into this. Your suggestion directed me straight to the root cause: SSH authentication issue, the agent doesn't know about keyboard-interactive method. I had to enable the old builtin pwd auth mechanism.

For those not familiar with OpenSSH, it is option 'PasswordAuthentication=yes'

View solution in original post

5 REPLIES 5
marce1000
VIP Advisor

 

 - Check and or turn on verbose logging for the remote sshd-server, then see what is reported when  you try confcopy with the scp protocol

 M.

View solution in original post

Hello,

Thanks for looking into this. Your suggestion directed me straight to the root cause: SSH authentication issue, the agent doesn't know about keyboard-interactive method. I had to enable the old builtin pwd auth mechanism.

For those not familiar with OpenSSH, it is option 'PasswordAuthentication=yes'

View solution in original post

 

 - Good work !

 M.

Thanks Marce !

 

 - Please mark thread as resolved , not so much for myself but for those who browse subjects on the forum and or later indexing in search engines too.

 M.

Content for Community-Ad