locked
SSH from .Net web project to Solaris 10? RRS feed

  • Question

  • User896063852 posted
    Hi, I was wondering if anyone has ever built any type of custom control to accomplish what the title implies, a SSH connection to a Solaris box from a .Net web server.  Basically want to make a .Net box the centeralized location for data collection across multiple boxes, Solaris and Linux...  SSH is the authentication we currently use and would like to have the scripts pull the information so that it's located on the .Net box instead of on each individual box.  Trying to get away from expect/perl on each individual Solaris box that reports to a central server.  If anyone has any suggestions or any ideas, let me know please, thanks.
    Tuesday, September 2, 2008 1:09 PM

Answers

  • User-16411453 posted

     http webrequest on port 22 , there should be a way to change the port number, But something like this should work.

    Try
    Dim
    results As String
    Dim
    request As WebRequest = WebRequest.Create(????????_URL)
    request.Method = "POST"
    request.ContentType = "text/xml; charset=utf-8"
    results = WriteToURL(request, stXML)

    Response = RetrieveFromURL(request)

    Dim utf8 As Encoding = New UTF8Encoding()
    objWriter = New XmlTextWriter(writer, utf8)
    objWriter.WriteRaw(Response)
    objWriter.Flush()
    writer.Position = 0

    Catch ex As Exception
    'Context.Response.Write("Error Message from TransmitRateRequest or " & ex.Message & "<br />")

    End Try
     
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 2, 2008 2:14 PM