Protyposis

Travelling through time & space in real-time...

Deploying Laravel apps over SSH with Maneuver

Maneuver is a nice and simple (but unmaintained) plugin for remote deployments of Laravel apps over FTP and SFTP/SSH. The documentation on configuring SSH connections is lacking important details though, so here’s some examples. Maneuver uses the Bridge library under the hood, whose source code is how I found out the required parameters. The following example code demonstrates server configurations in the connections section of the maneuver.php config file.

Password authentication

This one is basically similar to the ftp example in maneuver.php.

'development' => array(
    'scheme' => 'ssh',
    'host' => 'myhost.com',
    'user' => 'myusername',
    'pass' => 'mypassword',
    'path' => '/path/to/my/laravel/app',
    // 'port' => 22, // optional
)

Public key authentication

For public key authentication, but private and public keys must be referenced. On Linux, they are usually located in the directory ~/.ssh/ and named id_rsa or id_dsa, with the .pub extension on the public key. On Windows, they can be found in C:\Users\<username\.ssh\.

'development' => array(
    'scheme' => 'ssh',
    'host' => 'myhost.com',
    'path' => '/path/to/my/laravel/app',
    // 'port' => 22, // optional
    'options' => [
        'pubkey' => [
            'user' => 'myusername',
            'pubkeyfile' => '/path/to/id_rsa.pub',
            'privkeyfile' => '/path/to/id_rsa',
            //'passphrase' => 'mykeypassword', // optional, if key is password-protected
        ]
    ]
)

There are no comments.

Leave a Reply