Imagine that you have a client and a server and that the client connects to the server using SSH (with or without Paramiko). Is it possible for Paramiko to utilize the already open SSH connection instead of creating a new one, so that another script can be ran on the server (and transfer a file back to the client for example) using the same existing connection? The goal is to avoid establishing multiple connections.
Asked
Active
Viewed 274 times
1 Answers
0
This is not really a programming/Python/Paramiko question. It's not possible with SSH at all. So it's not possible with Python/Paramiko either.
See
- Transfer files to/from session I'm logged in with PuTTY or
- Can you use SFTP to transfer files "backwards" to client during SSH on host?
Though if you connect with a (Python or whatever) script from the client machine, the remote script can talk to the local script to exchange the data (and the local script can save the data to a file).

Martin Prikryl
- 188,800
- 56
- 490
- 992