Deployer: How do i deploy to server through another ssh server

Created on 24 Mar 2016  路  4Comments  路  Source: deployphp/deployer

| Q | A |
| --- | --- |
| Issue Type | Feature Request |
| Deployer Version | N/A |
| Local Machine OS | OSX |
| Remote Machine OS | Linux |

Description

How do i deploy to server behind another server using ssh?

workstation->proxy(ssh)->target

feature

Most helpful comment

A simply way is to configure an alias in your ~/.ssh/config file

Host <your_tunnel_name>
    HostName <hostname_of_target>
    ProxyCommand ssh <username_of_proxy>@<hostname_of_proxy> nc %h %p 2> /dev/null
    User <username_of_target>

than you'll be able to simply connect through

# ssh <your_tunnel_name>

Simple solution to tunneling, without needed "deployer".
also makes your life easier to connect to your production server :)

All 4 comments

You can login via ssh to proxy and run dep deploy there.

A simply way is to configure an alias in your ~/.ssh/config file

Host <your_tunnel_name>
    HostName <hostname_of_target>
    ProxyCommand ssh <username_of_proxy>@<hostname_of_proxy> nc %h %p 2> /dev/null
    User <username_of_target>

than you'll be able to simply connect through

# ssh <your_tunnel_name>

Simple solution to tunneling, without needed "deployer".
also makes your life easier to connect to your production server :)

ssh tunneling seems to be the better solution while deployer not support tunneling yet.

This is working for me, after much failed experimentation with remote port forwarding.

ssh -A deployment-proxy ssh deployment-target php deployer.phar deploy local

You may have issues with the working directory if deployer.phar isn't in your home directory. I created a bash function to wrap up the cd app-dir; dep deploy ...;

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flashios09 picture flashios09  路  4Comments

minkbear picture minkbear  路  4Comments

greatwitenorth picture greatwitenorth  路  4Comments

ElForastero picture ElForastero  路  3Comments

krve picture krve  路  4Comments