I want to connect my portable generator through my shed which is fed from a separate 50amp circuit breaker in the house.I have a spare 30amp breaker in the shed that I will connect to the generator through a outside 30amp outlet. Can I do this even though the inside breaker is 50amps.
No, you absolutely CANNOT connect your portable generator, through your shed, and on to the house.
The only way you can do this is at the house with an approved transfer device or main-breaker-interlock.
If you'd like more info let me know and I'll edit this answer.