how do we connect to a remote server via sftp to verify if the login details are valid in php…
i’m using apache server… my use is to check whether the login details entered by user is correct or not.
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.
You might have an easier time using phpseclib, a pure PHP SFTP client. Here’s an example:
The problem with libssh2, as everyone’s recommending, is that it’s not very widely deployed, it’s API isn’t exactly the most reliable, it’s unreliable, poorly supported, etc.