Sftp not able to connect in magento2.2.5?

I am not able to connect to Sftp in magento2.2.5

Here is my code:

public function execute()     {         $  connection = $  this->sftp->open(                     array(                         'host' => 'myhostname',                         'username' => 'myusername',                         'password' => 'mypassword',                         'port' =>22,                         'passive' => true                     )                 );         if($  connection){         echo "true";          }else{             echo "false";         }                 //print_r($  connection);         die; 

But it is returning false.

I don’t know what is the problem.

Any help would be appreciated.