wait for ssh connection to succeed