Certainly! When using Laravel Envoy with a custom SSH port, you can specify the port number in your server declaration in the Envoy.blade.php file.
Solution:
You can define the host with a port in the @servers directive. For example, if your custom SSH port is 2222, use the following format:
@servers(['web' => '[email protected]:2222'])
Alternatively, you can use SSH configuration aliases or pass extra SSH options.
Using SSH Options:
You may also include SSH options (such as port) using the --option parameter in the @task directive:
@task('deploy', ['on' => 'web', '--port' => 2222])
cd /path/to/project
git pull origin master
@endtask
But the most common and recommended way is to include the port directly after the host using a colon : as shown above.
Summary:
Just append :port to your server definition:
@servers(['web' => '[email protected]:2222'])
Now Envoy will connect using SSH on port 2222 instead of the default 22.
Reference: