'ssh-rsa']); if (ssh2_auth_pubkey_file($connection, 'root', '/home/root/.ssh/id_rsa.pub', '/home/root/.ssh/id_rsa', '')) { echo "Public Key Authentication Successful\n"; } else { die('Public Key Authentication Failed'); } } }