Code Monkey home page Code Monkey logo

Comments (4)

jbardin avatar jbardin commented on August 25, 2024

Can you show an example of exactly how you're sending the file? The remote command for a single file hasn't changed.

from scp.py.

g-phillips avatar g-phillips commented on August 25, 2024

Exact same method as below works in 0.5.1.

import paramiko
import scp

ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

sf = 'test.txt'
df = 'sup-bootdisk:/test.txt'

ssh_client.connect(hostname, username=username, password=password, allow_agent=False)
scp_client = scp.SCPClient(ssh_client.get_transport())
scp_client.put(sf, df)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/scp.py", line 77, in put
self._recv_confirm()
File "/usr/local/lib/python2.7/dist-packages/scp.py", line 232, in _recv_confirm
raise SCPException(msg[1:])
scp.SCPException: scp: 'sup-bootdisk:/test.txt': No such file or directory

from scp.py.

jbardin avatar jbardin commented on August 25, 2024

It's been a long time since I used Cisco devices; I assume sup-bootdisk:/ refers to a device?

The scp command is looking for a directory named sup-bootdisk: in the current directory. I was quoting more than I had to just to be safe, but I'll have to do some tests to make sure removing the quotes doesn't cause any other regressions.

from scp.py.

jbardin avatar jbardin commented on August 25, 2024

The problem was the _sh_quote regex.

You can pull from master if you want to get it now. I'll make a new release shortly.

from scp.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.