Two plugins are available for you. Assuming you have limited ssh connections, the following might help you.
1) MultiJob Plugin: - You can create downstream jobs that will accept input from previous builds. So based on your settings, you can configure new tasks for different SSH connections. For example: -
if you have 4 ssh connections A, B, C, D do 4 auxiliary tasks for each connection. you can write simple if else conditions that Job sets, if the input parameters are A, B, C, D.
2) JobDSL : - , .. groovy if else, , , A, B, C, D.
, .