Jump to content

Support for sftp key auth


BomAle

Recommended Posts

Posted

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'
);

 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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