We have a server that is set up so you can't log in with root directly. You first log in with a user, then run su and enter the password.
I need to SSH into a server, using phing, and sudo then run a command. I thought if I can get it working just via ssh
, I can use that command in an exec task in phing, but can't even get the plain SSH right.
Is this possible?
I've tried the following:
ssh user@server 'su && cd /var/www/clients'
ssh user@server 'su && {{password}} && cd /var/www/clients'