PHP ssh2://

王林
Release: 2023-09-15 13:06:01
forward
1429 people have browsed it

PHP ssh2://

Introduction

libssh2 The library provides access to resources on a remote computer using a secure encrypted transport. They are shell, remote execution, tunneling, file transfer and SCP. PHP has wrappers for these resources. They are ssh2.shell://, ssh2.exec://, ssh2.tunnel://, ssh2.sftp://, and ssh2.scp:// respectively.

Please note that these wrappers are not enabled by default. The SSH2 extension provided by PECL must be installed.

Usage

ssh2.shell://user:pass@example.com:22/xterm
ssh2.exec://user:pass@example.com:22/usr/local/bin/somecmd
ssh2.tunnel://user:pass@example.com:22/192.168.0.1:14
ssh2.sftp://user:pass@example.com:22/path/to/filename
Copy after login

ssh2.*// Context options

session Pre-connected to be reused ssh2 resource
sftp Pre-allocated sftp resource to be reused
methods Use Key exchange, host key, encryption, compression and MAC methods for callbacks
username Username to connect to
password Password used for password authentication
pubkey_file Pubkey file name used for authentication
privkey_file Name of the private key file used for authentication
env Associative array of environment variables to set
term Terminal emulation type requested when allocating pty
term_width When allocating pty Requested terminal width
term_height Requested terminal height when allocating pty
term_units Units to use with term_width and term_height

The above is the detailed content of PHP ssh2://. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!