There are couple of ways..Here is one sample using firewall filter:
set policy-options prefix-list SSH 10.2.8.0/26
set policy-options prefix-list SSH 10.3.10.0/24
set firewall family inet filter SSH term 1 from source-prefix-list SSH
set firewall family inet filter SSH term 1 from protocol tcp
set firewall family inet filter SSH term 1 from port ssh
set firewall family inet filter SSH term 1 then accept
set firewall family inet filter SSH term 2 then log
set firewall family inet filter SSH term 2 then reject
set interfaces <XYZ> unit <X> family inet filter input SSH