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
-1
votes
1 answer

SFTP upload very slow with phpseclib

SFTP upload is slow, I tested it in a client and with phpseclib and the client was much faster while phpseclib was much slower. Is this normal behavior? What could cause this? I trimmed down what we were exporting and used tar w/ gzip to archive…
fr332lanc3
  • 151
  • 1
  • 11
-1
votes
1 answer

Is it possible to 'ssh chain' with phpseclib?

Servers aren't visible, they are hidden behind another server. In order to make them visible you have to log into the first server over ssh. Once there the other servers are visible and you can ssh into them from the current server (the one you…
fr332lanc3
  • 151
  • 1
  • 11
-1
votes
1 answer

openSSL rsa_padding_mode:pss be emulated with phpseclib: RSA

How can this openSSL command be emulated with phpseclib: RSA openssl pkeyutl -verify -in gfeHmac.bin -sigfile privkey2_140225_gfesig.bin -pubin -inkey pubkey2_140225.pem -pkeyopt digest:sha256 -pkeyopt rsa_padding_mode:pss -pkeyopt…
-1
votes
2 answers

Array from nlist() showing periods

I am using the nlist() function from PHPseclib to list the contents of a directory on a remote server. This is the result I get. Array ( [0] => newfile.txt [1] => . [2] => .. [3] => oldfile.txt [4] => ReadMe.pdf ). I do have the following…
Shane A. Darr
  • 521
  • 6
  • 16
-1
votes
1 answer

How to verify if SCP was successful?

I'm using http://phpseclib.sourceforge.net/ to make an SSH connection to my server, then execute an SCP command to transfers to a remote server. The library's exec() method returns a string (looks like the standard output of the SCP command) instead…
snoopy76
  • 305
  • 2
  • 7
  • 15
-1
votes
1 answer

phpseclib is using openssl during create key?

I was under the impression that phpseclib didn't need openssl however when I try the following code... $rsa = new Crypt_RSA(); $key = $rsa->createKey(); I get the following error as IF it is using openssl functions. Sort of confused. Warning:…
Xenland
  • 510
  • 1
  • 6
  • 19
-1
votes
1 answer

phpseclib reconnect automaticallly OR SFTP increase active session time

I am using the phpseclib library for files downloaded from SFTP server. Sometimes the script does not download the file even there is a file in SFTP. Sometimes the file will download when we refresh a couple of times. How can I reconnect…
Bharanikumar
  • 25,457
  • 50
  • 131
  • 201
-2
votes
1 answer

PHPSeclib Public Key Authentication Successful on Localhost; Failing when deployed

I've created a script which connects to a server using the phpseclib extension, using public key autentication (as you see here), by generating a key pair using ssh-keygen. What I'm facing now is that the connection works very well when I run the…
DevelJoe
  • 856
  • 1
  • 10
  • 24
-2
votes
1 answer

How to convert rsa from python to php?

I am trying to encrypt a password to sent to through an API for authentication. My situation is quite similar to another encrypt example The python part is form see the get_pwd_rsa function Python part: import rsa key = rsa.PublicKey(n,…
Hanson
  • 99
  • 8
-2
votes
1 answer

Why cant i log in with phpseclib in mvc?

i was testing my code only in my controler and it worked, when i went to put all in the model and call the functions in the controller it wont connect to the sftp server. require "vendor/autoload.php"; use phpseclib\Net\SFTP; class sftpInno…
Alexis Garcia
  • 452
  • 3
  • 15
-2
votes
2 answers

Using phpseclib to check if file already exists

I'm trying to create a script that will send across files from one server to another. My script successfully does that as well as checks if the file has something in it or not. My next step is to check whether the file already exists on the server;…
Ember
  • 284
  • 2
  • 12
-2
votes
2 answers

How do I make this script copy files to local disk?

I have copied and tried many PHP scripts from SO posts. I am trying to download files from a server running Centos. Via psftp (putty) I can login manually and copy files. But I want to automate the process, hence the need for a script. On a similar…
Zilore Mumba
  • 1,346
  • 4
  • 23
  • 33
-3
votes
1 answer

phpseclib working fine until this morning for no reason - not finding directories

my phpseclib-1.0 was working fine yesterday, but then all of a sudden my script is flagging this error; PHP Warning: include_once(Math/BigInteger.php): failed to open stream: No such file or directory in /home/Net/SSH2.php on line 943 PHP Warning: …
NRav
  • 407
  • 1
  • 6
  • 18
-4
votes
1 answer

encrypt and decrypt with phpseclib using rsa public and private key , getting decryption error

phpseclib: php code : include('Crypt/RSA_XML.php'); $rsa = new Crypt_RSA_XML(); $rsa->loadKeyfromXML($public_key_xml); $data =…
1 2 3
55
56