moul/assh

How does the `User` applied?

wd opened this issue · 2 comments

wd commented

When I have configs like below

    172.30.1.1:
        User: dong

    172.30.*:
        User: ubuntu

the Assh will use ubuntu as the user. Even the debug log says it uses dong

DEBUG   Host    {"host": "{\"AddKeysToAgent\":\"yes\",\"ControlMaster\":\"auto\",\"ControlPath\":\"~/.ssh/cm/%h-%p-%r.sock\",\"ControlPersist\":\"yes\",\"IdentityFile\":[\"~/.ssh/id_ed25519\"],\"P
ort\":\"22\",\"SendEnv\":[\"AWS_PROFILE\"],\"ServerAliveInterval\":30,\"UseKeychain\":\"yes\",\"User\":\"dong\",\"HostName\":\"172.30.1.1\"],\"Hooks\":{}}"}
DEBUG   Proxying

How can I set a different User for that specific host?

Mohammad Ali