Question Computer refusing to boot

Jan 25, 2020
Hello, I've been hassling with my computer on and off for the past few days and I'm stumped.

So when I start my computer, it will light up and the fans will spin but it will shut off a few seconds afterwards. There's no display and my peripherals power on for a split second. There's been times where I've gotten the computer to boot and I was able to use it as normal without any issue. I turn it off and come back to it later and the problem is there again.

I've been trying to troubleshoot but I'm at my wits end. I'm suspecting that it's the CPU or Motherboard but I want some advice before I jump to the conclusion. (This computer is 6-7 years old so I wouldn't be suprised if it's hitting the bucket on me.)

Attempts (All failed):
Swapping HD to SSD
Swapping PSU
Unplugging all peripherals
Swapping RAM into different slots/taking each out and testing one at a time
Removing Video Card
Not plugging in Display
Unplugging SSD
Unplugged Front USB ports (Though those never worked anyway)

(Also I don't know if this is related but the keyboard I use for this computer no longer inputs on any PC but still lights up.)

I appreciate any help I could get. Thank you in advance.