if you're trying to connect to an ssh server in an environment where the ssh2 extension cannot be installed this pure-php implementation may be helpful:
http://phpseclib.sourceforge.net/documentation/net.html
Güvenli Kabuk 2
- Giriş
- Yapılandırma/Kurulum
- Öntanımlı Sabitler
- SSH2 İşlevleri
- ssh2_auth_hostbased_file — Bir genel konak anahtarı kullanarak kimlik doğrulaması yapar
- ssh2_auth_none — "none" kimlik doğrulaması yapar
- ssh2_auth_password — Parola kullanarak kimlik doğrulaması yapar
- ssh2_auth_pubkey_file — Bir genel anahtar kullanarak kimlik doğrulaması yapar
- ssh2_connect — Bir SSH sunucusuna bağlanır
- ssh2_exec — Uzak sunucu üzerinde bir komut çalıştırır
- ssh2_fetch_stream — Başka bir veri akımı döndürür
- ssh2_fingerprint — Uzak sunucunu parmakizini döndürür
- ssh2_methods_negotiated — Müzakere yöntemlerini listeler
- ssh2_publickey_add — Yetkili bir genel anahtar ekler
- ssh2_publickey_init — Genel anahtar alt sistemini ilklendirir
- ssh2_publickey_list — Yetkili genel anahtarları listeler
- ssh2_publickey_remove — Bir genel anahtarı siler
- ssh2_scp_recv — SCP üzerinden bir dosya alır
- ssh2_scp_send — SCP üzerinden bir dosya gönderir
- ssh2_sftp_lstat — Uzak sunucudaki bir sembolik bağın durum bilgisini döndürür
- ssh2_sftp_mkdir — Uzak konakta bir dizin oluşturur
- ssh2_sftp_readlink — Bir sembolik bağın hedefini döndürür
- ssh2_sftp_realpath — Belirtilen dosya yolu dizgesinden gerçek yolu elde eder
- ssh2_sftp_rename — Bir uzak dosyanın ismini değiştirir
- ssh2_sftp_rmdir — Karşıdan bir dizin siler
- ssh2_sftp_stat — Uzak dosya sistemindeki bir dosyanın durum bilgisini döndürür
- ssh2_sftp_symlink — Karşıda bir sembolik bağ oluşturur
- ssh2_sftp_unlink — Bir dosyayı siler
- ssh2_sftp — SFTP alt sistemini ilklendirir
- ssh2_shell — Bir etkileşimli kabuk isteği yapar
- ssh2_tunnel — Uzak bir sunucuya doğru bir tünel açar
SSH2
zelnaga+php at gmail dot com
25-Feb-2009 08:45
25-Feb-2009 08:45
steven at salvania dot be
08-Jan-2009 10:09
08-Jan-2009 10:09
For windows users only:
The PECL ssh2 extension is not able to use (at least) the pubkey authentication correctly, as well as it will crash at the point where the connection is closed because of the wrong functions being used under windows.
Thanks to some patches and comments from other users I was able to compile this extension and you can download it from:
http://www.salvania.be/tmp/php_ssh2__528.rar
This works (at least) with PHP 5.2.8. It is linked against libSSH2 v1.0 and OpenSSL v0.9.8i.
Have fun!
codeslinger at compsalot dot com
06-Aug-2008 02:36
06-Aug-2008 02:36
if you are trying to build this PECL extension because your distro does not already provide it.... then you need to apply a patch or else it won't "make". The problem is that libssh2 has changed the name and value of a conditional compile flag. See this bug for the fix.
http://pecl.php.net/bugs/bug.php?id=11779
P.S. if you are using Ubuntu 8.04 or earlier, the package request has already been filed.
tom at r dot je
03-Jul-2008 09:38
03-Jul-2008 09:38
As an alternative to using SSH2, it's easier to mount a remote file system ( http://ubuntu.wordpress.com/2005/10/28/
how-to-mount-a-remote-ssh-filesystem-using-sshfs/ ) and use the standard php copy() unlink() etc files.
