Link to home
Start Free TrialLog in
Avatar of larrylroberts
larrylroberts

asked on

Code example for plink.exe redirect of results

I am hoping somebody could provide a code example of how plink.exe can be used to log into a linux server, run a few commands and direct all of the ouput to a textbox within VB.net 2010.

I know the command line to get the connection....
       Dim Unix_User_Name As String = "XXX"
        Dim Unix_User_Password As String = "XXX"
        Dim NDS_Start_SIT_Putty_Command_Value As String = "C:\plink.exe " + Unix_User_Name + "@spongeshrimp.grhq.XXX.com -pw " + Unix_User_Password

Open in new window


But then what I want to do is a....
ls -la

Open in new window


And then capture all the reults of that command in a textbox.  I know this is done through streamreading however I am not that up on how this is acomplished.  I just need a code example.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Russell_Venable
Russell_Venable
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well I gave the answer. I answered what the OP asked for. Just didn't get a response back. This will do exactly as wanted.
Avatar of Dirk Haest
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.