Does anyone know a SSH/ SFTP/ FTP wrapper class around pfsockopen();?? I’m still on my quest to keep persistent connections in PHP.
Does anyone know a SSH/ SFTP/ FTP wrapper class around pfsockopen(); ?? I’m still
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After a quick read, it looks like opening a socket deals with a different layer then what you are wanting. You want to connect via SSH or SFTP, which is the Application Layer using a method that makes connections via TTP/TLS/UDP, which is the transport layer.
So really what you want (I think) is to create an SSL or TLS connection using the
pfsockopen()function, and then use that connection to pass data via the SSH/SFTP protocol.According to the PHP site:
So my best guess is that you set your hostname to start with
ssl://and then use the SSH or SFTP port as the port (so port 22 or port 989). Something like:or