Re: Hoping for a working example of SFTP in PHP

[email protected] (David Spector)
Newsgroups php.general
Message-ID <[email protected]>
I found a discussion of changing the format of the public key at 
https://blog.oddbit.com/post/2011-05-08-converting-openssh-public-keys/.

So I used

ssh-keygen -f w.pub -e -m pem

to get a "BEGIN RSA PUBLIC KEY" file from the "ssh-rsa" file.

My program still fails with the same error message.

I also tried reading the key files into strings:

$wpub=file_get_contents("w.pub");
$wkey=file_get_contents("w.key");
if (ssh2_auth_pubkey_file($connection, $user, $wpub, $wkey, $passphrase)) {

And this, too, failed with the same error message.

Why can't ssh2_auth_pubkey_file give more details in its error message?

I'm again running out of free time. Any experts out there?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.