how to reuse ssh.Client connection
Closed this issue · 0 comments
lyonsdpy commented
Devices always have connection number limit , so I don't want to negotiate the ssh every time , then I try to cache the *ssh.Client and reuse it , but it seems not support in this lib.
the satisfactory result may look like this:
- Do TCP connection and negotiate SSH , Create
*ssh.Client
as ClientX - If there's a SSH command request , Create a ssh session on ClientX , then do something , then release the session
- if there's a Netconf request ,Create a netconf session on the same ClientX. And the same logic to sftp.