I have a Linux Cable-Modem here with open source inside.
As I can estimate there is BSD Linux embedded (together with WRT?) - this device is running too as firewall router :
The thing is following - I want to adjust iptables inside the cable modem - how do I do this ? :
I tried this, but connection timed out at port 22 :
There is no OpenWrt for any cable modem. Cable modem firmware is closed-source and the loading of firmware to your modem is controlled by the cable company. This is actually not a bad idea since improper firmware has the potential to interfere with the service of other customers.
It appears you're trying to follow someone's recipe without understanding how it is supposed to work. Running sudo ssh ... is very bad advice for the security of your PC, it should be ssh root@... Just from that I'd consider the source of that recipe to be dubious.
Beside that, the connection time out means that as is almost universally the case, the cable modem firmware does not accept ssh connections. So this whole plan is a non-starter to begin with.
Since you don't know what firmware is running, you should consider any cable modem insecure and untrusted and make it part of the Internet rather than part of your LAN. The only practical way to secure your network is to have your own router after the cable modem.