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