PHP SSH2简单实例
程序员文章站
2024-01-18 18:18:40
...
1.摘自:http://cn.php.net/ $connection = ssh2_connect ( 'shell.example.com' , 22 );
ssh2_auth_password ( $connection , 'username' , 'password' );
ssh2_auth_password ( $connection , 'username' , 'password' );
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
下一篇: 简单的js表单验证函数_表单特效