moul / assh

:computer: make your ssh client smarter
https://manfred.life/assh
MIT License
3.06k stars 157 forks source link

User with command line Gateway is not working #325

Open victordidenko opened 5 years ago

victordidenko commented 5 years ago

Maybe I'm missing something, but I cannot find what... I have simple config like this

hosts:

  hosta:
    HostName: hosta.example.com
    User: hostauser

  hostb:
    HostName: hostb.example.com
    User: hostbuser

My local machine user, let's say, called user

When I connect to both hosts in separate (ssh hosta or ssh hostb), everything is working just fine.

But when I try to use some host as a gateway, for example ssh hostb/hosta — it uses my local username user to connect to hostb, not hostbuser as specified in config!

If I manually specify user, like ssh hostbuser@hostb/hosta — this works.

victordidenko commented 5 years ago
$ ssh hostb/hosta
user@hostb/hosta's password: ^C

$ ssh hostbuser@hostb/hosta
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64)
...