I have a list of hosts 192...* with a default user and password, I've tried to set wild-card in
.authinfo.gpg but it still requests password when I try to login.
There are no problems when it set per host IP.
You cannot do this in TRAMP, as has already been pointed out, but you can partly do this in your SSH config. (I merely assume that you are using SSH, because what other options are there? Hopefully you are not using telnet.)
You should read the
ssh_config man page for the details, but you can put something like this in your
You cannot set a password this way, but you can specify which key pair to use using the IdentityFile declaration. This lets you log in without a password.
At pointed out by @michael-albinus,
auth-source does not support explicit host wildcards. It does however support fallback matching, so a
machine foo login bar password pass-bar
login baz password pass-baz
will return "bar/pass-bar" for host "foo" and "baz/pass-baz" for every other host.