Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUPPORT] - Adding Custom Extension or Implementing Server-Side Copy Operation #2336

Closed
TWTom041 opened this issue Dec 17, 2023 · 2 comments
Closed
Labels

Comments

@TWTom041
Copy link

Are you using paramiko as a client or server?

Server

What feature(s) aren't working right?

SFTP

What version(s) of paramiko are you using?

3.3.0

What version(s) of Python are you using?

3.9.11

What operating system and version are you using?

Windows 11

If you're connecting as a client, which SSH server are you connecting to?

OpenSSH v9.4.0

If you're using paramiko as part of another tool, which tool/version?

No response

What are you trying to do with paramiko?

I am attempting to implement a server-side file copy operation using Paramiko. The goal is to copy files on the remote server from one location to another without having to transfer the data to the client side.

How are you trying to do it, and what's happening instead?

I have explored the existing Paramiko documentation and examples, but I couldn't find clear guidance on how to implement server-side file copy operations. Specifically, I want to add a custom extension or hook to Paramiko that supports a "copy-file" operation.

Here are my observations of the source code:

in paramiko\sftp.py, line 161, there's a check-file extension pair declared.

extension_pairs = ["check-file", "md5,sha1"]

I tried to change it to ["copy-file", "md5,sha1"] and ["copy-file", "md5,sha1"], but it seems to be not working.
image

So I doubt that should not be the proper way to add extension. But I can't find the documentation describe how to do it.

Thanks to anyone that can guide me to the right path.

Anything else?

No response

@TWTom041
Copy link
Author

This question has been answered on Stackoverflow: link

@bskinn
Copy link
Contributor

bskinn commented Dec 18, 2023

Thanks for following up and closing this out, @TWTom041! Glad you got your question answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants