Yes, it is certainly possible.
You have 2 options here:
SSH to switch and then from the SW SSH to the router.
This should work no matter what IP configurations you have on your interfaces as long as they are correctly connected.
SSH directly to the router also. For this case you will have to have proper routing enabled so that your router will be reachable. You may test this using ICMP towards the router interface that is on the switch side.
You should also make sure no access-lists interfere with your connectivity.
A generally correct setup may be something like:
- Make a VLAN in the switch to connect to PC
- Assign the port towards PC to that VLAN
- [Optional] Enable DHCP to assign an address pool on that VLAN
- Make another VLAN to be used to connect to the router
- Assign the interface towards the router in that VLAN
- Make sure IPs are proper on PC and router for each VLAN you made on the switch
- enable inter-VLAN routing in the switch
At this point you should be able to SSH directly from PC to router also.