Issue with ssh user other than root

I’m trying to add a DigitalOcean host but the only way to succeed is leaving ssh user set to root, or I’ll get a

Error detecting OS: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded

The username field is for your to tell docker-machine what username is needed to login to the host and install docker/rancher agent. It is not a choice for your to pick the username you’d like it to be, the user is defined by the OS image DigitalOcean deploys. Most (but not all) of them are root so that’s why it’s the default. If you put in the wrong name, SSHing to the host fails and it cannot finish being provisioned, then machine gives up after 60 tries.

1 Like

Ohhh… that makes sense, thank you @vincent!
Since Rancher would provision the whole node without intervention I supposed it would set the user however I inputed. Especially because on videos and tutorials you would often see this rancher user which doesn’t look like a default.

So do you think root is just fine or is there a way to set it differently?

The provider (DigitalOcean) creates the OS images and sets the username that is provisioned… The result of calling the DO API and saying to create a droplet is a VM has a user named root with the SSH key tied to it. There’s no way for us to control that.

DO generally sets it to root for everything, but CoreOS is always core so they follow that. rancher would be for for RancherOS.

1 Like

The same problem arises for me while adding host from Opennebula driver.
Error:
2018-01-24 09:55:43,106 ERROR [:] [] [] [] [ecutorService-4] [.e.s.i.ProcessInstanceDispatcherImpl] Unknown exception running process [host.provision:209] on [9] io.cattle.platform.util.exception.ExecutionException: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded

What is the solution?

CoreOS Containers: core
rancherOS Containers: rancher
Ubuntu Containers: root