Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am trying to use ssh using the public key on PHP. I created ssh keys and assigned to droplet successfully. And I can access the root on the terminal without any issue.
As there is a permission issue, I copied the keys to /var/www/html/.
But I am getting an error “ssh2_auth_pubkey_file(): Authentication failed for root using public key:”
Here is my code:
$host = ‘127.0.0.1’; //Droplet ip $port = 22; $user = ‘root’; $pass = ‘pass’; $pubkey = ‘./.ssh/id_rsa.pub’; $prikey = ‘./.ssh/id_rsa’;
$conn = ssh2_connect( $host, $port ); $auth = ssh2_auth_pubkey_file( $conn, $user, $pubkey, $prikey, $pass );
if ( $auth ) { echo ‘Public Key Authentication Successful.’ . PHP_EOL; } else { echo ‘Public Key Authentication Failed.’ . PHP_EOL; }
Please help.
Stefan
patrickniessenmakezens
donmez.dogan
41809fc37fa549b98a34934d238850
Código de referido Binance
yolanda smith
b1cfd497da4348d08019b0315db7a0
Deeraj EA
1ddffddc31ea402a842dcb134f6134
bec1cd09097d477da725b161a4066f
Anjanesh Lekshminarayanan
Anjanesh Lekshminarayanan