question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

file transfer from nxos

See original GitHub issue

I’m trying to load a cisco nxos image. Once I give the scp command I’m ideally asked to enter my password. I have used the delay_factor and tried to implement the same but I still face the error saying pattern was not matched. I guess I’m missing something here. Can someone guide me?

cmd = 'copy scp://abc@1.1.1.1/xxx/xxx/nxos.bin NXOS-ab vrf management'
output = net_connect.send_command(cmd, delay_factor=4)
if 'password: ' in output:
    output+=net_connect.send_command('hello123')
else:
    print "Failed"

-------
ERROR
  File "./sample", line 31, in <module>
    output = net_connect.send_command(cmd, delay_factor=4)
  File "/Users/abhsrini/Library/Python/2.7/lib/python/site-packages/netmiko/base_connection.py", line 1188, in send_command
    search_pattern))
IOError: Search pattern never detected in send_command_expect: n9k\-1\#

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
abhiramsrinicommented, Jan 4, 2019

I actually figured it out. I needed an expect_string to complete the scp process. Thanks

0reactions
ktbyerscommented, Jan 2, 2019

@abhiramsrini Can you copy and paste a the CLI output from when you do this manually?

What error do you see when the script terminates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Transfer files between NX-OS switches
Solved: Dear community, is it possible to FTP or TFTP files in bootflash between two Nexus switches. I am attempting to do so...
Read more >
Copying Files To Or From Nx-Os - Nexus 9000 Series
Copying Files to or from Cisco NX-OS. You might need to move files to or from the device. These files may include the...
Read more >
cisco.nxos.nxos_file_copy module – Copy a file to a remote ...
This module supports two different workflows for copying a file to flash (or bootflash) on NXOS devices. Files can either be (1) pushed...
Read more >
Cisco Nexus file transfer with alternate SCP/SFTP server
This template can be used to transfer the Cisco Nexus NX-OSs to one or multiple devices at the same time using SCP. You...
Read more >
Automate file uploads to your Cisco Nexus switches
Has the file been transferred? (true or false) – if it already exists, it will not be transferred. Is the MD5 checksum of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found