Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8324815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:12:50+00:00 2026-06-09T00:12:50+00:00

I am using phpseclib in my project. I have installed it and am testing

  • 0

I am using phpseclib in my project. I have installed it and am testing it using the following piece of code which is similar to the example here.

Updated Code:

1           require("Net/SSH2.php");
2   
3           if (!class_exists('Net_SSH2')) die("Class Net_SSH2 doesn't exist!");
4           
5           $ssh = new Net_SSH2('***');   // the host IP address 
6           
7           if (!method_exists($ssh, 'Net_SSH2')) die("Net_SSH2 class doesn't have Net_SSH2 method!");
8    
9           if (!$ssh->login('***', '***')) {   // (verified) username and password
10              echo "LOG: " . $ssh->getLog() . "<br>";
11              exit('Login failed!');
12          }

Code Update 2:

1       require("Net/SSH2.php");
2
3       define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX);
4
5       if (!class_exists('Net_SSH2')) die("Class Net_SSH2 doesn't exist!");
6       
7       $ssh = new Net_SSH2('***');   // the host IP address 
8       
9       if (!method_exists($ssh, 'Net_SSH2')) die("Net_SSH2 class doesn't have Net_SSH2 method!");
10
11      if (!$ssh->login('***', '***')) {   // (verified) username and password
12          echo "LOG: " . $ssh->getLog() . "<br>";
13          echo "ALL ERRORS: ";
14          print_r($ssh->getErrors());
15          echo "<br>LAST ERROR: " . $ssh->getLastError() . "<br>";
16          exit('Login failed!');
17      }

It exits at line # 16. getLog() gives nothing so it is hard to know where the problem is. I had the login credentials tested using PuTTY. It is not able to login to other servers either. I am not able to understand what is causing the problem.

Any help would be highly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:12:53+00:00Added an answer on June 9, 2026 at 12:12 am

    I ended up hosting my code on the server (server B) that I was trying to connect. The same code worked in the opposite direction (I could connect to the server A where my code previously was)! I ended up concluding that the server A has environmental issues.
    I appreciate those were helping me here!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using MVC2 I have an AJAX form which is posting to a bound model.
Using MVVM. I have a DataTemplate which I am using to display an expander
Using boost python I need create nested namespace. Assume I have following cpp class
I am attempting to install an application using phpseclib (using apt-get) and want to
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using Java,I have to fetch multiple sets of values from an XML file to
using chrome and ff so far have made a nasty glitch when using scrollTo
Using report builder 3.0, I have a report that queries a cube. How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.