New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.


Comments
SFTP via SSH is in php
https://www.php.net/manual/en/function.ssh2-sftp.php
That's complex. phpseclib handles this better. But the problem is that it does not support SSH tunneling. At least the easy way...
Have you tried the easy button? Sorry I mean have you tried AI?
Of course.
The simplest and easiest fix is to drop PHP. Python is a much better choice.
Do you want to just connect to SFTP? or do you want to connect to SFTP solely via SSH tunnel (something like ssh -D)?
Run ssh separately, even exec it from php if you have to, and forward the tunnelled port to a socket that php can connect to directly
The problem:
Hope that clarifies what I need.