Fixed hanging ssh bug FINALLY

Used ssh -f mode to make the ssh sessions ends. HALLELUJAH!