Emil Rowland
Emil Rowland

Reputation: 558

ftp_ssl_connect from Apache/php is failing while command-line sftp is working

server I can run the command: sftp [email protected] But when I test this PHP command it is unavailable to connect to the sftp.

$ftp_conn = ftp_ssl_connect("192.168.0.130", 22) or die("Could not connect to 192.168.0.130"); 

Why is it like this? I use an Ubuntu Server 15.04 and Apache2.

Upvotes: 0

Views: 852

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202642

SFTP is not FTP over TLS/SSL.

So the PHP FTP/SSL client will fail to talk to the remote SSH server.

See

Upvotes: 0

Related Questions