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?

DavidPostill
  • 162,382
ABOCb
  • 21

1 Answers1

1

The solution is:

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