Jump to content

Community

BomAle

Support for sftp key auth

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

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy