Answer the question
In order to leave comments, you need to log in
How to pass the contents of the SSH key to the function instead of the path?
The point is this. At the moment, the usual bundle of php-> ssh-> HyperVisors on different platforms is working on the Ubuntu server. There was a need to hide ssh keys from the file system in the database. Exaggerated, authentication is done via
$auth = ssh2_auth_pubkey_file($connection, $user, '.ssh/id_dsa.pub', '.ssh/id_dsa', $pass);
I tried to serve the contents of files instead of '.ssh/id_dsa.pub', '.ssh/id_dsa' via file_get_contents and reading from the database - the function requires the file. How to cheat?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question