How to connect to remote server from web application RRS feed

  • Question

  • User-73514677 posted


    I am using a web application and want to connect to a remote server. I have tried the below:

      using (SshClient ssh = new SshClient("server name", port, "username", "pwd"))
                        var result = ssh.RunCommand("df -h");

    I am getting error as - No connection could be made because the target machine actively refused it server:port

    Is there any other way to connect to remote server from a web application ?


    Wednesday, November 28, 2018 9:40 AM


  • User1120430333 posted

    Either the service is not running and listening on the inbound port.

    A  firewall is blocking unsolicited inbound traffic on the port,  or  packet filtering software running on the computer is blocking inbound traffic on the port.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 28, 2018 10:04 AM