You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transferring a file to a cisco router results in Initializing SCP session of remote file [bootflash:cat9k_iosxe.17.12.04.SPA.bin] for write failed with error [b'Socket error: No such file or directory'
I looked through the source code, the failure occurs when pylibssh calls the libssh.ssh_scp_init method. But, I didn't go any further. (See line 64 here: https://github.com/ansible/pylibssh/blob/devel/src/pylibsshext/scp.pyx)
- name: Copy the candidate IOS image to the switch. This can take 5+ minutes for 1GB switch bundles.
when: ios_verify.parsed.present is false
vars:
ansible_command_timeout: 600
ansible.netcommon.net_put:
src: "{{ local_image_dir }}/{{ ios_image }}"
dest: "{{ flash_dir }}{{ ios_image }}"
protocol: scp
overwrite: true
EXPECTED RESULTS
File is copied
ACTUAL RESULTS
Initializing SCP session of remote file [bootflash:cat9k_iosxe.17.12.04.SPA.bin] for write failed with error [b'Socket error: No such file or directory'
The text was updated successfully, but these errors were encountered:
SUMMARY
Transferring a file to a cisco router results in
Initializing SCP session of remote file [bootflash:cat9k_iosxe.17.12.04.SPA.bin] for write failed with error [b'Socket error: No such file or directory'
Context: https://stackoverflow.com/questions/76789209/no-such-file-or-directory-error-when-using-ansibles-net-put-and-libssh-to-a
Workaround
This works fine if
ansible_network_cli_ssh_type: paramiko
ISSUE TYPE
PYLISSH and LIBSSH VERSION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
File is copied
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: