I setup .ssh/config with some declarations for my vm's and I copied my user key over and can ssh without password.
but I have in the past just yesterday provisioned machines like this and it worked, but now I can't after destroy environment and even reinstalled fresh ubuntu server on the vm's all except the juju-bootstrap vm, that one I am reusing.
juju add-machine ssh:juju-wordpress --debug
2014-03-31 14:01:51 INFO juju.cmd supercommand.go:297 running juju-1.17.7-unknown-amd64 [gc]
2014-03-31 14:01:51 DEBUG juju api.go:171 trying cached API connection settings
2014-03-31 14:01:51 INFO juju api.go:238 connecting to API addresses: [xx.xx.xxx.xxx:17070]
2014-03-31 14:01:51 INFO juju apiclient.go:114 state/api: dialing "wss://xx.xx.xxx.xxx:17070/"
2014-03-31 14:01:51 INFO juju apiclient.go:124 state/api: connection established
2014-03-31 14:01:51 INFO juju.environs.manual init.go:139 initialising "juju-wordpress", user ""
2014-03-31 14:01:51 DEBUG juju.utils.ssh ssh.go:234 using OpenSSH ssh client
2014-03-31 14:01:51 DEBUG juju.utils.ssh ssh_openssh.go:122 running: ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /Users/myusername/.juju/ssh/juju_id_rsa -i /Users/myusername/.ssh/id_rsa ubuntu@juju-wordpress sudo -n true
2014-03-31 14:01:54 INFO juju.environs.manual init.go:150 ubuntu user is already initialised
2014-03-31 14:01:54 ERROR juju.cmd supercommand.go:300 lookup juju-wordpress: no such host
++++++++++++++++++++++++++++
usernames and ip address stripped
++++++++++++++++++++++++++++
I think the right thing to do here is to just warn if the hostname can't be resolved, and skip setting addresses on the machine. The worker/machiner code will set the machine's addresses at init time. The only difference here is that none of the addresses will be "public", but that is reality in this scenario at least.