#!/bin/bash 

function Invoke_SSH_Command {
	user=$1
	pass_file=$2
	host=$3
	port=$4
	command=$5

	rnd=$(echo $RANDOM | md5sum | head -c 6)
	tmp_output="/tmp/output_${rnd}"

	sshpass -f "$pass_file" ssh -o StrictHostKeyChecking=no -p "$port" -q "$user"@"$host" "$command" &>"$tmp_output"
	retcode=$?
	cat "$tmp_output"
	rm "$tmp_output" >/dev/null
	return $retcode
}
