Possible to wrap ssh? #208
Unanswered
chandlerkent
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi. Honestly, I'm not sure. Never tried to wrap Even then, I don't really understand why a pseudo-terminal is even necessary to read/write data from/to streams, but perhaps it's required for some Maybe NodeJS does some special magic when you pipe the streams to Also, could SSH.NET be a reasonable alternative? As far as I know, it doesn't actually wrap |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am attempting to write a wrapper around open-ssh (ssh) and using CliWrap makes this much less daunting than using Process directly. However, I'm running into a few issues and want to know if anybody has experience doing this and does it work with CliWrap?
First here's my naive code:
When I run this trying to connect to some host I get the error:
Which I've seen other discussion on here on trying to pass this through
cmd
or otherwise. But when I try that I get the same error. Here's the code:OK, so I can work around this by using an argument in
ssh
called -t (or -tt to really force it?) and it gets rid of that error, but then I get duplicated output and prompts from ssh open a little dialog instead of allowing me to type into the shell directly.For context, I am porting a similar tool I have written in nodejs to C# for reasons and the nodejs version works simply with something like this:
I'm not saying I expect CliWrap to work the same as nodejs here, but since I know it is possible for this to be done I'm wondering if CliWrap can do what I am expecting?
Thanks for the great library and thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions