I thought this should be an extremely basic question, but googling has only revealed one other question on here [1], which did not help.
I have a rather extensive ssh config. How do I get TRAMP to respect it? Most things work out of the box, except for the username, for which TRAMP prompts me for every single server. I would like TRAMP to stop prompting me and just use the "user" entry from my ssh config. Is there a setting for this?
Edit: TRAMP only prompts when the config uses canonicalisation. That is, the following ssh config works:
Host foo
HostName foo.example.com
User BettaGeorge
However, the following instead prompts me for a username:
CanonicalDomains example.com
CanonicalizeHostname yes
Host *.example.com
User BettaGeorge
Setting the username per-host (without wildcards) is not an option since I manage a large cluster of occasionally short-lived virtual machines.
I have confirmed that tramp-default-user-alist
is nil
when this happens.
My emacs version is 27.2 on linux, my TRAMP version is 2.4.5.27.2.