fix errors and add ssh_timeout as macro argument