"PHP ssh2 auth pubkey file()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==))
20번째 줄: 20번째 줄:
* [[PHP SSH2 함수]]
* [[PHP SSH2 함수]]


==참고 자료==
==참고==
* http://php.net/manual/en/function.ssh2-auth-pubkey-file.php
* http://php.net/manual/en/function.ssh2-auth-pubkey-file.php


[[분류: PHP]]
[[분류: PHP]]

2017년 6월 27일 (화) 12:37 판

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 }}