PHP ssh2_auth_pubkey_file()

1 개요[ | ]

PHP ssh2_auth_pubkey_file()
  • 공개키를 이용하여 SSH 인증하는 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');
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}