ssh2_auth_pubkey_file
    (PECL)
ssh2_auth_pubkey_file -- 
     公開鍵を使用した認証を行う
    
Description
bool 
ssh2_auth_pubkey_file ( resource session, string username, string pubkeyfile, string privkeyfile [, string passphrase] )
     ファイルから読み込んだ公開鍵を使用した認証を行います。
     もし、privkeyfile が暗号化されている
     (そうあるべきです) 場合、パスフレーズも引数に渡す必要があります。
    
例 1. 公開鍵を用いた認証 
<?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'); } ?>
 |  
  |