trying to ssh to another system then perform db2 commands however using 'su db2admin -c' does not seem to work, although it works for normal system commands ..
#!/bin/bash
sshpass -p 'passw0rd' ssh root@server.com "su db2admin -c 'db2text start'"
this is the output ..
rob@laptop:~/Desktop$ ./script.sh
bash: db2text: command not found
Any ideas?