Ssh to lxc container from a different machine

I am looking for clear documentation for how to ssh to a lxc from a different machine.
The container
is on host
I can ssh to from
But I can’t seem to find any resource for how to ssh from to ?
Most resources talk about lxd proxy.
Thank you

If using LXD, then those resources are correct, you’d add a proxy device to do this.

If using regular LXC (lxc-start, lxc-create, …), then there is no built-in way to do this and it’d be up to you to write firewall NAT rules on your system to forward a port to the container.

Thanks. I am focusing on learning to work with lxc.
So - I need to port forwording say port 2222 on my host machine ( to port 22 on the lxc container ( ?
Then ssh to and it will be forwarded to - am I correct here?
only question is how do I actually do this? is there a doc with examples or could you recommend what should I search for?
Thank you

iptables -t nat -A PREROUTING -d -p tcp --dport 2222 -j DNAT --to or something along those lines