I recommend you take a look at this post by @r5e. He solved this problem modifying some arguments in the original SSH connection script.