S
S
Sergey2015-07-11 16:57:00
PHP
Sergey, 2015-07-11 16:57:00

How to make a PHP:SSH connection through a server on WindowsXP?

The bottom line is this:
1) There is a remote VM server on MSserver2012 with ViseSSH installed and a set of keys.
2) There is a test web server on WinXP with OpenServer 5.2.2 with Apache 2.2 PHP 5.4.
It is possible to connect to the server without any problems using familiar tools like Putty or standard ~ ssh on Linux.
The problem occurs when trying to authenticate from a web server via SSH to a VM server using PHP. When executing the ssh2_auth_pubkey_file() function, the web server gives the error "Unable to open public key file". Poryskav on the forums, I realized that the problem lies in the file permissions, however, on the advice of those forumists, I checked the rights through file_get_contents - all the way through. The problem is not peculiar to users of Unix systems, everything is simply solved there through chmod 777.
Windows cacls.exe says that all users have Full rights to key files. I twisted key algorithms in RSA DSA and others offered by viseSSH - also to no avail. Can anyone advise how to be?
PS: one day I will definitely ride unix's. Until there is not enough time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2015-07-11
@xmoonlight

ssh2_auth_pubkey_file()

1. Are you sure you are authenticating via ssh2 pub-key?
2. Did you receive it before you start using it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question