0

Right now my .ssh/config has a lot of entries like this:

Host         a
Hostname     foo01.bar.quuux.zot.d.t.s.cc
User         sds
ProxyCommand ssh -A -l sds XXX.XXX.XXX.XXX nc %h %p

Host         b
Hostname     goooo013.zoo.bar.quuux.zot.d.t.s.cc
User         sds
ProxyCommand ssh -A -l sds XXX.XXX.XXX.XXX nc %h %p

i.e., the only difference between entries is the Host alias and the first part of the Hostname.

I wonder if it is possible to avoid this boring duplication.

1 Answer 1

0

Sorry, there doesn't seem to be a default domain in ssh_config. If your machine is also at .zoo.bar.quuux.zot.d.t.s.cc then you don't need the domain name. Failing that, your best bet is either to just do it by hand like you're probably doing it now, or write a script that takes lines:

a foo01
b goooo013

and outputs the .ssh/config file (or maybe write a macro in your favorite text editor that does the conversion).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .