Can I connect a portable generator to a subpanel to backfeed my house?
NO.
You'll likely end up backfeeding the grid, which can easily lead to linemen being injured or killed.  A generator should never be connected to the electrical system without a proper transfer switch being installed.