PHP: ftp_ssl_connect() question

software development

#1

I’m writing a script to transfer files from DH to another server and it needs to be as secure as possible. I would use passthrough() and use scp with the public/private key setup, but the DH server is having problems with ssh/scp out (still waiting to hear back from support on this). In the mean time, I’ve created a script using ftp_ssl_connect() to transfer files…well, almost. It’s done up to the point of transferring the files.

My question is, does ftp_ssl_connect() encrypt the entire ftp session? Including any data (files or otherwise) transfered during that session? I’ve read the php.net manual, but it doesn’t really say much about ftp_ssl_connect() other than it opens an SSL FTP connection.

Thanks in advance for any help on this…


Randy Sesser
University Extended Education
California State University, Stanislaus
http://www.ExtendedEd.com/


#2

What’s wrong with ssh / scp (ie what’s not working)?

If ftp_ssl_connect uses SSL FTP, I believe the entire connection should be encrypted.


#3

I can’t ssh/scp out from dali. To anywahere, strange, my workstation at work, my computer at home…anywhere. strange appears to be fine. I know that dali had some hardware issues and things were replaced. The error I get is rather useless…all I get is: “Host key verification failed.” I don’t know what that’s all about. If you want I can send you the debug messages from the ssh client…I did for support but they haven’t responded yet :\

And yes, ftp_ssl_connect() uses SSL FTP. I wonder where I could get solid info on this…any ideas?

Thanks
Randy


#4

The problem is with permissions on /dev/tty (I’ve seen this happen on some of the other newly upgraded machines, although it’s supposed to be fixed).

It’s a bit tricky, since the error that OpenSSH spits out has nothing to do with the actual problem.

From the end of:
dali% strace ssh william@jazz.hq.newdream.net
[…]
open("/dev/tty", O_RDWR|O_LARGEFILE) = -1 EACCES (Permission denied)
open("/dev/tty", O_RDWR|O_LARGEFILE) = -1 EACCES (Permission denied)
write(2, “Host key verification failed.\r\n”, 31Host key verification failed.
) = 31
shutdown(3, 2 /* send and receive */) = 0
close(3) = 0
_exit(255) = ?

After changing the permissions on /dev/tty, this seems to be fixed.


#5

Thanks! That did it.