Skip to content

Please login as the user \"ubuntu\" rather than the user \"root\ during provisioning #3542

@florentdestremau

Description

@florentdestremau
  • Deployer version: 7.2.1
  • Deployment OS: ubuntu 20.04

I have a OVH VPS that I provisioned. I can only login via ssh on the ubuntu user with sudo enabled. I tried the dep provision -o become=root -o remote_user=ubuntu even while having the deployer user in my deploy.php config (as stated in the docs).

Everything went fine until provision:website where it seems to force the deployer user but I can't access the server with this user. When investigating I ended up finding that my rsa key was added like this:

# /home/deployer/.ssh/authorized_keys
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".';echo;sleep 10;exit 142" ssh-rsa XXXX-MY-KEY-XXXXXX
ssh-rsa XXXX-MY-KEY-XXXXXX

As you can see my key is added twice AND with a guard preventing me to login.

Looking further it seems it's copying my standard root user authorized_keys instead of creating a usable configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions