Run simple command line on the remote host using existing SSH configuration
已回答
Hi there!
I have the run configuration with some configurable params and SSH config picker based on existing `SSH Configurations` (Settings -> Tools -> SSH Configurations, collected via `SshConfigManager`)
How can I connect to the remote terminal using this SSH config and run some command on it? I think I can use `ColoredRemoteProcessHandler` and `RemoteProcess`, but don't know how exactly.
请先登录再写评论。
Odael, the SSH-related functionality you're asking for is available in IU only and isn't public.
However, you may try using the following method:
Thanks! I can build SshSession using this util. but how can I use it to run command on the remote server and how can I wrap it with corresponding ProcessHandler (for example, ColoredRemoteProcessHandler)?
Use i.e. CapturingSshProcessHandler: