CakeSecLib automates loading phpseclib in CakePHP.
Clone the plugin inside your myapp/Plugin and activate it with bootstrap enabled:
CakePlugin::loadAll(array(
'CakeSecLib' => array('bootstrap'=>true)
));
Head on to phpseclib documentation of what available classes you can use.:
<?php
include('Net/SFTP.php');
$sftp = new Net_SFTP('www.domain.tld');
if (!$sftp->login('username', 'password')) {
exit('Login Failed');
}
// outputs the contents of filename.remote to the screen
echo $sftp->get('filename.remote');
?>
CakeSecLib is released under the WTFPL license.