I am new to phpseclib and I am facing the same issue as this old Stack Overflow post.
<?php
set_include_path('/home/eibahhxo/public_html/EibaMed/phpseclib');
//echo get_include_path();
ini_set('display_errors', 'On'); ini_set('html_errors', 0); error_reporting(-1);
include(get_include_path().'/Net/SFTP.php');
$sftp = new Net_SFTP('ftp.*****.com',22);
if (!$sftp->login('username', 'password')) { //if you can't log on...
print_r($sftp->getSFTPErrors());
exit('sftp Login Failed');
}
$output = $sftp->put('/inbound/00017', '/00017');
?>
While making this code, it throws this following error
Notice: Cannot connect to ftp.*****.com:22. Error 110. Connection timed out in /home/eibahhxo/public_html/EibaMed/phpseclib/Net/SSH2.php on line 1046 Array ( ) sftp Login Failed
How can I resolve this?