My gradle-ssh-plugin script is using a lot of small methods which performs some actions on a remote host. As far as I understand it each time I use the session() keyword a new SSH connections is established, right?
Is it possible to reuse an existing SSH session and passing it around? Maybe like this:
My current version
My
gradle-ssh-plugin
script is using a lot of small methods which performs some actions on a remote host. As far as I understand it each time I use the session() keyword a new SSH connections is established, right?Is it possible to reuse an existing SSH session and passing it around? Maybe like this: My current version
Version reusing sessions