I'm trying to connect via sftp to my server with private key (.ppk file and ssh-dss) in PHP
The problem is that the private key is ssh-dss not RSA.
I tried to use phpseclib with this code but doesn't work (RSA I suppose)
set_include_path(get_include_path() . PATH_SEPARATOR . 'lib/phpseclib');
include('Net/SSH2.php');
include('Crypt/RSA.php');
$rsa = new Crypt_RSA();
$rsa->setPassword('my-pass-phrase');
$content = file_get_contents('key/private.ppk');
$rsa->loadKey($content);
$ssh = new Net_SSH2('host');
if (!$ssh->login('username', $rsa)) {
exit('Login Failed');
}
Thanks