I am trying to automatically run ssh commands to linux server from my local machine, usng asp.net page.
I have created a key pair using puttygen and ask network administrator to authenticate key in server. then i try this code in my page.
Dim p As New Process
Dim si As New ProcessStartInfo
Dim read As System.IO.StreamReader = Nothing
si.Arguments = "plink -ssh connectremote -l testuser"
si.FileName = "C:/my stuff/plink.exe"
si.CreateNoWindow = True
p.StartInfo = si
read = p.StandardOutput
lblMsg.Text = read.ReadToEnd()
Catch ex As Exception
lblMsg.Text = ex.ToString()
this code set to button click and once click the buttin it prompt console and I cannot do any thing.
how should i solve this problem
Actually i need to run few commands from back end , like first one to login using saved session in putty , and then su command to change substitute user then cd to go to a directory and from there run some commands define in that server
and then i need to know the out put
how do i do these all in one button click with any window prompt
plaese help me or direct
View Complete Post