1

The following command is failing:

ssh -t user@server-01 sudo -iu suser "cd /opt/jboss ; ./portal.sh stop"

I getting:

bash: ./portal.sh: No such file or directory

How can I change directory remotely and execute a remote command in that directory?

1 Answer 1

1

The solution is:

ssh -t user@server-01 sudo -iu suser "eval 'cd /opt/jboss ; ./portal.sh stop'"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .