ubuntu安装SSH2
生活随笔
收集整理的這篇文章主要介紹了
ubuntu安装SSH2
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
apt-get install libssh2-1-dev libssh2-php
service apache2 restart
安裝完成之后,可以使用SCP遠程復制文件:
$connection = ssh2_connect("192.168.1.1",22);
if(ssh2_auth_password($connection,"aaa","pass"))
{
echo "Authentication Successful! ";
}else{
die("Authentication Failed...");
}
$ret = ssh2_scp_send($connection,'/var/www/aaa', '/var/www/aaa');
轉載于:https://www.cnblogs.com/zhuyanwei/p/5402244.html
總結
以上是生活随笔為你收集整理的ubuntu安装SSH2的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【UVA1378】A Funny Sto
- 下一篇: 毕业设计今日总结(一)