Comments (4)
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.
Exact same method as below works in 0.5.1.
import paramiko
import scpssh_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.
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.
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)
- Support streams HOT 3
- exlude some files HOT 1
- remote delete Files after successfully download HOT 1
- Freebsd (Juniper Junos) not happy with extra space in Secure Copy get HOT 2
- Creating directories HOT 1
- Transfer directory HOT 4
- paramiko.ssh_exception.SSHException: Incompatible ssh peer (no acceptable host key) on all tests HOT 1
- Get data into file-like object - getfo HOT 1
- scp does not work with pathlib.PurePath HOT 1
- How do I download multiple files at the same time?
- Permission denied with .put() HOT 10
- Remote wildcard does not work HOT 2
- File not closed in case SocketTimeout occured
- Pass progress callback when calling get/put methods on SCPClient HOT 3
- Retrieve scp errors HOT 6
- add support when both source and target are from remote locations (not necessary the same server)
- Add support for get() to keep downloaded file in memory via a BytesIO object as the "local_file" HOT 1
- Request for enhancement support to download all regular file in case of there is non-regular file under one folder HOT 3
- Using a trailing forward slash in Windows causes problems
- New Release? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scp.py.