How to execute a method on remote machine connecting with sshpass Following is the code:
#!/bin/bash
checkfunctioncall() {
cd "/home/user"
mkdir "remotecalltest"
}
sshpass -p "$serverpwd" ssh "$serveruser"@"$serverip" checkfunctioncall
but I am getting below error:
bash: checkfunctioncall: command not found
Please suggest
I am specifically looking for solution with sshpass, as I need to login to remote server with a password