You looking to block SSH from IP range (ip address 172.18.2.1/24) - then below ACL help you.
access-list 100 deny tcp any 172.18.2.0 0.0.0.255 eq 22
access-list 100 permit ip any any
Then on your layer 3 SVI under the vlan interface apply it in or outbound
Interface vlan 2
XXXXXXXXXXXXXXXXXX
ip access-group 100 in
ip access-group 100 out