Questions tagged [phpseclib]

phpseclib is a PHP library that provides pure-PHP implementations of: - BigIntegers - ECDSA / ECDH (66 curves supported) - Ed25519 / Ed448 - Curve25519 / Curve448 - RSA - DSA - DH - SSH2 - SFTP - X.509 - Symmetric key encryption - AES - Rijndael - DES - 3DES - RC4 - Blowfish - Twofish - ChaCha20 - GCM - Poly1305

phpseclib is a PHP library that provides pure-PHP implementations of:

  • BigIntegers
  • RSA
  • SSH1
  • SSH2
  • SFTP
  • SCP
  • ASN1
  • X.509
  • Symmetric key encryption
  • AES
  • Rijndael
  • DES
  • 3DES
  • RC4
  • Blowfish
  • Twofish

Repository at GitHub: https://github.com/phpseclib/phpseclib

839 questions
3
votes
1 answer

Ways to speed op phpseclib sftp get to download remote file

So I use phpseclib which downloads a 50MB file over sftp in roughly 45 seconds. Which is fast compared to ssh2_scp_recv() which takes 90+ seconds, but slow compared to my sftp client (filezilla), which takes 10 seconds max. My question is, what can…
Kevin Op den Kamp
  • 565
  • 1
  • 8
  • 22
3
votes
1 answer

PHP Steam bot - How to login to page using RSA

I've been trying to make simple Steam bot for sending announcements to Steam group by logging in to Steam page and then sending annoucement. I got stuck in logging in. Here is what I have: include('Math/BigInteger.php'); …
typekcz
  • 113
  • 2
  • 6
3
votes
1 answer

laravel ssh - Expected SSH_FXP_VERSION

I am using the laravel Task functions to run some code using phantomjs and then using the output. The code is executed using a artisan command. This is a part of the code I use: private static function phantomjs($file, $c, $a) { …
Jerodev
  • 32,252
  • 11
  • 87
  • 108
3
votes
1 answer

Error 110 Connection Timed out using phpseclib trying to upload via SFTP

I'm a newbie here, but I'll try to describe my problem as best as I can. Basically I have been trying to trigger an automated SFTP upload of a screenshot file whenever someone completes an order on my client's site. This is for a review of the…
noctis_lucis
  • 53
  • 1
  • 6
3
votes
1 answer

How to change directory and run git commands using PHPseclib?

I'm trying to use PHPseclib to SSH and run commands on the remote server. I want to change directory and commands like git pull or clone. Is there a way to do this? I know that "cd" doesn't work well with exec. So any alternatives to this? Thanks
Ananth Ravi
  • 717
  • 2
  • 7
  • 13
3
votes
1 answer

Why is an E_WARNING acting like an E_ERROR?

I am running a script that requires a file which is not properly included in my script. PHP Fatal error: require_once(): Failed opening required 'Math/BigInteger.php' (include_path='.:/usr/share/php:/usr/share/pear') in /myDir/Net/SSH2.php on line…
MirroredFate
  • 12,396
  • 14
  • 68
  • 100
3
votes
2 answers

Securing webservices of PHP

I'm developing a small project in android which is using php webservices' call. I want my webservices to be protected, however by using GET/POST request methods I don't think its much protected. After googling I got RSA implementation in…
Ravi Dhoriya ツ
  • 4,435
  • 8
  • 37
  • 48
3
votes
2 answers

PHP SFTP with proxy

I'm searching for a class / extension / whatever that allows me to use a proxy for an SFTP connection in PHP. I've checked the ssh2_ftp function and phpseclib, but I didn't find any reference to proxy settings... Any idea?
napolux
  • 15,574
  • 9
  • 51
  • 70
3
votes
1 answer

How to download a file from an SFTP server using PHP

I'm looking to allow a user to download a file directly from an sftp server, but in the browser. I've found methods to read the file and echo the string (connections using ssh2.sftp or phpseclib) but I need to download, rather than read. Also, I've…
coffeedoughnuts
  • 505
  • 1
  • 5
  • 12
3
votes
1 answer

Why is phpseclib not signing this cert corrrectly?

I try to sign a key with phpseclib and when I decode the result with openssl I get the following: 140513785948000:error:0D07209B:asn1 encoding routines:ASN1_get_object:too long:asn1_lib.c:142: 140513785948000:error:0D068066:asn1 encoding…
chacham15
  • 13,719
  • 26
  • 104
  • 207
3
votes
2 answers

phpseclib sftp connect with private key and password

Is there anyway to connect the sftp with both private key and ftp password by using phpseclib or any other method.
Ron Paul
  • 31
  • 1
  • 1
  • 4
3
votes
4 answers

C# encrypt PHP decrypt using RSA

I'm trying to build a simple RSA encryption decrpytion process between C# and PHP. I've accomplished encrypting in PHP and decrpyt in C# with phpseclib(http://phpseclib.sourceforge.net/). However I'm getting "Decryption error in…
relativelyPrime
  • 151
  • 1
  • 8
3
votes
1 answer

phpseclib or ssh2 pecl extension

My post from yesterday: https://stackoverflow.com/questions/14296006/phpseclib-sftp-port-number Ok, so yesterday I started learning about SSH / SFTP with php. I searched a bunch of forum posts and surmised that i needed to download the…
user1037355
3
votes
1 answer

phpseclib NET_SFTP_STATUS_NO_SUCH_FILE: File not found when file DOES exist

I am using phpseclib to upload a file to a remote server. Previously, my script worked fine, but a few weeks ago it appears to have stopped working. I am getting a NET_SFTP_STATUS_NO_SUCH_FILE: File not found from $sftp->put. The problem is…
Bad Programmer
  • 3,642
  • 13
  • 46
  • 53
3
votes
1 answer

PHP SFTP Simple File Upload

I'm using phpseclib - SFTP class and am trying to upload a file like so - $sftp = new Net_SFTP('mydomain.com'); if (!$sftp->login('user', 'password')) { exit('Login Failed'); } $sftp->put('/some-dir/',$fileTempName); The file however isn't…
user1551120
  • 627
  • 2
  • 8
  • 14