ssh - PHP multiple SFTP Command
one text
Solution:
I was finally able to download in 1 line of syntax, which I did not know before, because of Key-pair login this did not required any password !
I finally used
passthru('sftp -o PORT=6010 JJEE@XX.160.XX.XX:/BACKUP/01December2021.zip',$result);
This is not an exact answer but it did temporarily solve the issue.
Source