# Locked out of my production Environment

**URL:** https://discourse.roots.io/t/locked-out-of-my-production-environment/11003
**Category:** trellis
**Tags:** ssh, trellis
**Created:** 2017-11-25T14:05:09Z
**Posts:** 6

## Post 1 by @pixeline — 2017-11-25T14:05:14Z

I provisioned a website on a digitalocean VPS, which default user is “root” instead of “admin”.  
I provisioned and deployed with the setting `sshd_permit_root_login` set to true.

A few days later, with the site now up and running, I thought it be a good idea to set that setting to false… Forgetting that my admin user is “root”… Oups.

I’m now locked out. I tried ssh-ing using the web user then sudo, but it asks for a password that does not exist…

The only option I have is to reset the root password using digitalocean control panel, but that creates downtime.

Do you see any other option that would not involve downtime (apart from setting up a new VPS!) ?

---

## Post 2 by @strarsis — 2017-11-25T16:00:22Z

You could spin up a 2nd instance, point the domain to it (DNS) and then destroy the old one.

---

## Post 3 by @pixeline — 2017-11-25T16:33:31Z

Thank you, but that’s the one option i’d rather not consider. This site’s migration is a PITA.

---

## Post 4 by @strarsis — 2017-11-25T17:15:24Z

Why is the migration hard in this case? Database and uploads/ files can be transferred using a script.

---

## Post 5 by @ben — 2017-11-25T18:39:56Z

> [@pixeline](#):
>
> I provisioned a website on a digitalocean VPS, which default user is “root” instead of “admin”.

Hold up. “admin” is still created when you provision a VPS — that’s done by Trellis.

> <https://github.com/roots/trellis/blob/3e32e2ae9cc78010e8b36ba63cb52da52ed1582c/group_vars/all/users.yml#L2>

> [@pixeline](#):
>
> I’m now locked out. I tried ssh-ing using the web user then sudo, but it asks for a password that does not exist…

Sure it does. Do ` ansible-vault view group_vars/<environment>/vault.yml` and then copy the admin user password at the top.

> [@pixeline](#):
>
> The only option I have is to reset the root password using digitalocean control panel, but that creates downtime.

It’s pretty brief.

---

## Post 6 by @pixeline — 2017-11-26T12:18:16Z

> [@ben](#):
>
> Sure it does. Do ansible-vault view group\_vars/\<environment\>/vault.yml and then copy the admin user password at the top.

Thanks a lot that solved it!
