I'm trying to connect to a SFTP server using phpseclib, only it doesn't work and I can't seem to figure out why.
I have the following:
$ssh = new SSH2('some.server.tld');
if (!$ssh->login('username')) {
throw new LocalizedException(__('cannot login'));
}
some.server.tld
has my public key and I am able to connect using a default ssh
-command in my terminal using the same credentials, but for some reason phpseclib doesn't work.
I tried getting errors from phpseclib, but nothing is thrown. Not even when I enable the error logging. Zero: no errors.
Anyone knows what might be going wrong here?