machine icon indicating copy to clipboard operation
machine copied to clipboard

Different Default SSH Users among providers (VirtualBox and Digital Ocean)

Open nireak opened this issue 11 years ago • 2 comments

I have noticed that the default SSH User (and I don't know how to change it) is "docker" at VirtualBox and "root" at Digital Ocean. I think that could be a problem IMHO if your use, for instance, VBOX for developing and DO for staging/production and you want to be sure that both environments and the scripts used to configure them are exactly the same.

Is there an easy way to configure DockerMachine for these environments, like using "--Virtualbox-ssh-username" ?

Thank you

nireak avatar Jun 18 '15 22:06 nireak

@nireak If the provider supports it, there's a *-ssh-user flag:

$ dm create | grep ssh-user
   --amazonec2-ssh-user "ubuntu"                                            set the name of the ssh user [$AWS_SSH_USER]
   --generic-ssh-user "root"                                                SSH user
   --openstack-ssh-user "root"                                              OpenStack SSH user
   --rackspace-ssh-user "root"                                              SSH user for the newly booted machine. Set to root by default

Perhaps we should allow a --virtualbox-ssh-user flag, or simply a generic flag that works for all providers.

nathanleclaire avatar Jul 06 '15 21:07 nathanleclaire

@nathanleclaire thank you for your answer.

I think the best option would be a generic flag that works for all providers. The default ssh-user should be the same (root, perhaps) for all providers. If not, portability would be problematic.

nireak avatar Jul 13 '15 18:07 nireak