0

server I can run the command: sftp user@192.168.0.130 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.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Emil Rowland
  • 538
  • 5
  • 25

1 Answers1

1

SFTP is not FTP over TLS/SSL.

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

See

Community
  • 1
  • 1
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992