I have a script test.sh
and I am trying to ssh and call that scrip't function in the same script:
#!/bin/sh
testme()
{
echo "hello world"
}
ssh myserver "/opt/scripts/test.sh; testme"
But I keep getting testme command not found
What is the correct way of calling a function from a script after ssh?