Closed vapniks closed 3 years ago
It would be helpful if you could add some code example of what you want accomplish.
Nevertheless, if you are using Guile-SSH remote pipes, then all commands executed on a session will go through the same connection to a host. The idea is that a Guile-SSH session holds the connection to a server and Guile-SSH channels are in charge of data exchange through the connection (in other words, channels do multiplexing.) Here's an ASCII image from the Guile-SSH documentation (3.1.1 Session Management):
[client] [server]
\____________________________/ SSH session
============================
============================ SSH channels
============================
____________________________
/ \
Hope it helps,
Artyom.
I want to use guile-ssh to open an ssh connection to a remote host, and then run several rsync commands on localhost which all make use of that same ssh connection.
I could do this by just making several guile system
calls replicating the previously mentioned shell commands, but that would get a bit messy, and I would prefer an idiomatic guile-ssh solution if there is one.
The explanation you gave above doesn't tell me how I can do this, because as far as I can tell channels can only be used to run commands on the remote host.
I just checked the libssh & libssh2 website, github page and mailing lists and the only mention of "ControlMaster" that I can find is this unanswered query: https://www.libssh.org/archive/libssh/2019-09/0000006.html So it appears that functionality is not available in libssh, and hence guile-ssh.
I want to run several rsync commands (on localhost) using the same ssh connection. I can do this using shell commands like this:
but how would I achieve the same thing using guile-ssh? I see no mention of control sockets in the manual, and I don't see any way to use channels to run rsync locally.