Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

At work, I often have to log into hosts which follow a common naming scheme, e.g. qc01 - qc12, hc01 - hc10, and so on. All of these need to get the same config values in my laptop's .ssh/config. Of course, I could use entries for the hosts qc* and hc*, but I'm wondering if instead it is somehow possible to use regular expressions?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

As gelraen stated default ssh_config won't support regular expressions but you can try something different like :

share|improve this answer
add comment

Please, see PATTERNS section in man ssh_config.

Long answer is: No, you can't, unless you patch your ssh to support that.

share|improve this answer
    
I cannot find this section in my man ssh_config. –  Patryk Jan 23 '13 at 13:55
1  
try linux.die.net/man/5/ssh_config –  gelraen Jan 23 '13 at 13:56
    
What version did that appear? –  vonbrand Jan 26 '13 at 7:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.