SSH2 ssh2_auth_none
(PECL ssh2 >= 0.9.0)
ssh2_auth_none — "none"으로 인증
설명
ssh2_auth_none(resource $session
, string $username
): mixed
일반적으로 실패하고 실패해야 하는 "none" 인증을 시도합니다. 실패의 일부로 이 함수는 승인된 인증 메서드의 배열을 반환합니다.
매개변수
session
- ssh2_connect() 호출에서 얻은 SSH 연결 링크 식별자입니다.
username
- 원격 사용자 이름.
반환 값
서버가 인증 메서드로 "없음"을 수락하면 true
를 반환하고 실패 시 수락된 인증 메서드의 배열을 반환합니다.
Examples
예제 #1 인증 메서드 목록 검색
<?php
$connection = ssh2_connect('shell.example.com', 22);
$auth_methods = ssh2_auth_none($connection, 'user');
if (in_array('password', $auth_methods)) {
echo "Server supports password based authentication\n";
}
?>