SSH2 ssh2_shell

(PECL ssh2 >= 0.9.0)

ssh2_shell — 대화형 셸 요청


설명

ssh2_shell(
    resource $session,
    string $term_type = "vanilla",
    ?array $env = null,
    int $width = 80,
    int $height = 25,
    int $width_height_type = SSH2_TERM_UNIT_CHARS
): resource|false
                

원격 끝에서 쉘을 열고 스트림을 할당하십시오.


매개변수

session
ssh2_connect() 호출에서 얻은 SSH 연결 링크 식별자입니다.
term_type
term_type은 대상 시스템의 /etc/termcap 파일에 있는 항목 중 하나와 일치해야 합니다.
env
env는 대상 환경에서 설정할 이름/값 쌍의 연관 배열로 전달될 수 있습니다.
width
가상 터미널의 너비입니다.
height
가상 터미널의 높이입니다.
width_height_type
width_height_typeSSH2_TERM_UNIT_CHARS 또는 SSH2_TERM_UNIT_PIXELS 중 하나여야 합니다.

반환 값

성공하면 스트림 리소스를 반환하고 실패하면 false를 반환합니다.


Examples

예제 #1 대화형 셸 요청

                  
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');

$stream = ssh2_shell($connection, 'vt102', null, 80, 24, SSH2_TERM_UNIT_CHARS);
?>
                  
                

기타