Home >Backend Development >PHP Tutorial >PHP SSH2简单实例
1.摘自:http://cn.php.net/
$connection = ssh2_connect ( 'shell.example.com' , 22 );
ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644);
?>
2.如果本地PHP不支持SSH2
摘自:http://www.asim.pk/2010/05/27/installing-phps-ssh2-extension-on-ubuntu/
sudo apt-get install libssh2-1-dev libssh2-php
重新启动apache