Jump to content

Support for sftp key auth


BomAle
 Share

Recommended Posts

Hello, I like the "auto upgrade system" but I would suggest to support authentification via public/private key (ssh2_auth_pubkey_file) for future.

Currently exist only the option with password (ssh2_auth_password).

Scaleway offer access via private key, and I prefer use it instead configure a ftp... there is a article that support my preference:

https://www.sitepoint.com/using-ssh-and-sftp-with-php/

Quote

Some administrators prefer using public and private keys to authenticate logins. If the service is configured and you want to connect in this way, you would use the following instead:


<?php
$conn = ssh2_connect('example.com', 22);
ssh2_auth_pubkey_file(
    $conn,
    'username',
    '/home/username/.ssh/id_rsa.pub',
    '/home/username/.ssh/id_rsa'
);

 

 

Edited by BomAle
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...