I am finding hard to run a process at background using paramiko. I used :
stdin, stdout, stderr = ssh.exec_command(\'executefile.py &\')
You can try:
stdin, stdout, stderr = ssh.exec_command('nohup python executefile.py >/dev/null 2>&1 &')