Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
25% Recurring Discount on NVMe VPS
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
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.

SSH tunnels in PHP

I need to connect to SFTP server via SSH tunnel. There is phpseclib but it does not support tunneling. There is socks and http proxy support, but it is pita. Does anyone knows PHP library (beside ssh2) which could work with phpseclib and create SSH tunneling?

Comments

  • JoshRJoshR Member, Patron Provider
  • @DataIdeas-Josh said: SFTP via SSH is in php

    That's complex. phpseclib handles this better. But the problem is that it does not support SSH tunneling. At least the easy way...

  • @Levi said:

    @DataIdeas-Josh said: SFTP via SSH is in 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?

    Thanked by 1WebProject
  • @huntercop said:

    @Levi said:

    @DataIdeas-Josh said: SFTP via SSH is in 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.

    Thanked by 1WebProject
  • 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

  • LeviLevi Member
    edited September 2024

    The problem:

    • Server A has limited outgoing ports;
    • From server A I launch "test connection" function to other servers for SFTP credentials;
    • Since those "other SFTP servers" has user defined SSH ports, server A must connect via proxy which has no limits for outgoing connections;

    Hope that clarifies what I need.

Sign In or Register to comment.