"PHP ssh2 connect()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-== 참고 자료 == +==참고==))
 
(다른 사용자 한 명의 중간 판 하나는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
{{DISPLAYTITLE:PHP ssh2_connect()}}
;PHP ssh2_connect()
;PHP ssh2_connect()
* SSH 서버에 접속하는 PHP 함수
* SSH 서버에 접속하는 PHP 함수


<source lang='php'>
<syntaxhighlight lang='php'>
$connection = ssh2_connect('135.79.246.80', 22);
$connection = ssh2_connect('135.79.246.80', 22);
if (ssh2_auth_password($connection, 'username', 'secret')) {
if (ssh2_auth_password($connection, 'username', 'secret')) {
10번째 줄: 11번째 줄:
   die('Authentication Failed...');
   die('Authentication Failed...');
}
}
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 22일 (일) 21:29 기준 최신판

1 개요[ | ]

PHP ssh2_connect()
  • SSH 서버에 접속하는 PHP 함수
$connection = ssh2_connect('135.79.246.80', 22);
if (ssh2_auth_password($connection, 'username', 'secret')) {
  echo "Authentication Successful!\n";
} else {
  die('Authentication Failed...');
}

2 같이 보기[ | ]

3 참고[ | ]

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