sshnet / SSH.NET

SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism.
http://sshnet.github.io/SSH.NET/
MIT License
3.94k stars 927 forks source link

Can this library be used to stream data to an ssh command #416

Closed Mark-Pfeifer closed 5 days ago

Mark-Pfeifer commented 6 years ago

I've started working with this library and have successfully executed simple commands on my ssh server.

What I'd like to do, but haven't found a way yet, is to send information my program over an ssh connection that serves as the input to the command executing on the host.

For example, one could send a .tar file as the input to a tar extraction command running on the host. The Linux equivalent would be cat somefile.tar | ssh user@host tar xz -C /destination.

At this point, it doesn't look like any of your command execution allows input. Please correct me if I've missed something.

WalkerNA commented 6 years ago

I don'to believe so. The closest discussion was in PR #141 which has not been resolved. I have yet to find a proper solution for this as well.

Mark-Pfeifer commented 6 years ago

Thanks for getting back to me. Sorry to hear that there’s no support for streaming input.

Mark Pfeifer

From: WalkerNA [mailto:notifications@github.com] Sent: Friday, April 6, 2018 10:58 AM To: sshnet/SSH.NET SSH.NET@noreply.github.com Cc: PFEIFER,MARK (A-LittleFalls,ex1) mark_pfeifer@agilent.com; Author author@noreply.github.com Subject: Re: [sshnet/SSH.NET] Can this library be used to stream data to an ssh command (#416)

I don'to believe so. The closest discussion was in PR #141https://github.com/sshnet/SSH.NET/issues/141 which has not been resolved. I have yet to find a proper solution for this as well.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sshnet/SSH.NET/issues/416#issuecomment-379279638, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AkUSiB9mgWNFP4bx9L4_BGvUln_CUtQhks5tl4JqgaJpZM4THMX0.

Rob-Hague commented 5 days ago

Added in #1293 (version 2024.0.0)