Re: Hoping for a working example of SFTP in PHP

[email protected] (David Spector)
Newsgroups php.general
Message-ID <[email protected]>
Stefan, I ran your program with w.pub and w.key, two of the local keys I 
have been testing with. My main question right now is what format 
ssh2_auth_pubkey_file expects the public and private keys to have. There 
are many formats for key files.

My w.pub starts with

-----BEGIN RSA PUBLIC KEY-----

and my w1.pub starts with

ssh-rsa

Anyway, here is the output of your program:

====
SYSTEM
0

Array
(
     [0] => 1492101109
     [1] => 28991922601259292
     [2] => 33206
     [3] => 1
     [4] => 0
     [5] => 0
     [6] => 0
     [7] => 426
     [8] => 1612210905
     [9] => 1612210511
     [10] => 1612209151
     [11] => -1
     [12] => -1
     [dev] => 1492101109
     [ino] => 28991922601259292
     [mode] => 33206
     [nlink] => 1
     [uid] => 0
     [gid] => 0
     [rdev] => 0
     [size] => 426
     [atime] => 1612210905
     [mtime] => 1612210511
     [ctime] => 1612209151
     [blksize] => -1
     [blocks] => -1
)

Array
(
     [0] => 1492101109
     [1] => 29836347531409753
     [2] => 33206
     [3] => 1
     [4] => 0
     [5] => 0
     [6] => 0
     [7] => 1766
     [8] => 1612213452
     [9] => 1612209076
     [10] => 1612209151
     [11] => -1
     [12] => -1
     [dev] => 1492101109
     [ino] => 29836347531409753
     [mode] => 33206
     [nlink] => 1
     [uid] => 0
     [gid] => 0
     [rdev] => 0
     [size] => 1766
     [atime] => 1612213452
     [mtime] => 1612209076
     [ctime] => 1612209151
     [blksize] => -1
     [blocks] => -1
)
====

Please tell me what this output means to you.

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.