Is SshClient threadsafe? #1473
-
Is SshClient threadsafe? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It depends what you intend to do. For example, running multiple commands simultaneously should be OK, but adding/removing forwarded ports has no thread safety |
Beta Was this translation helpful? Give feedback.
-
When the ssh clients are being simultaneously instantiated and connected, for a list of hosts of which some are online, others are offline, even those that target the online hosts wait for 20 seconds to connect. This is from Task.Run(). If I remove the offline hosts from the list, then there is no delay. |
Beta Was this translation helpful? Give feedback.
It depends what you intend to do. For example, running multiple commands simultaneously should be OK, but adding/removing forwarded ports has no thread safety