Re: Hoping for a working example of SFTP in PHP

From: Date: Mon, 01 Feb 2021 20:24:38 +0000
Subject: Re: Hoping for a working example of SFTP in PHP
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-327436@lists.php.net to get a copy of this message
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?

« previous php.general (#327436) next »