I was following the tutorial, attempting to test out deployment with Rubber. Managed to survive from the Duplicated rules error, creating instance error, etc but I was finally stopped by the infinite connection loop:

Manually connect to new instance with ssh and the key
Double check the rubber.yml to see if the key path is correct
Run the cap command in -v
Check if the instance I defined is the same as the default ami type

They all seems Correct so I think there must be something with the command used for rubber to connect and run the "sudo -p 'sudo password: ' bash -l -c 'mkdir -p /root/.ssh && cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'". However there's no where I can see what Rubber was talking to my instance. I tried to get into the source code but it lead me to no where too.

I have done quite a number of googling and it seems like it is quite a common error but no real solution to this. Can anyone suggest what's likely to be the problem? Thank you.