Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/1.php on line 1

Warning: Use of undefined constant DOCUMENT_ROOT - assumed 'DOCUMENT_ROOT' (this will throw an Error in a future version of PHP) in /home/vhosts/podolsk.xp3.biz/0.php on line 1
PHP. Руководство по PHP. 2005 (создание и продвижение сайта)
создание и продвижение сайта (вбиваю в ТОП-10, как гвозди)Настройка и сопровождение платной рекламы яндекс.директ

PHP. Руководство по PHP. 2005

ssh2_auth_pubkey_fileПред. След.

ssh2_auth_pubkey_file

(PECL)ssh2_auth_pubkey_file --  Authenticate using a public key

Description

bool ssh2_auth_pubkey_file (resource session, string username, string pubkeyfile, string privkeyfile [, string passphrase])


Authenticate using a public key read from a file. If privkeyfile is encrypted (which it should be), the passphrase must be provided.

Пример 1. Authentication using a public key
<?php

$connection = ssh2_connect('shell.example.com', 22, array('hostkey'=>'ssh-rsa'));

if (ssh2_auth_pubkey_file($connection, 'username',

                          '/home/username/.ssh/id_rsa.pub',

                          '/home/username/.ssh/id_rsa', 'secret')) {

  echo "Public Key Authentication Successful\n";

} else {

  die('Public Key Authentication Failed');

}

?>

Отвечу на любые вопросы. С уважением, Дмитрий Владимирович.

Ваше письмо×
Free Web Hosting