Can a Computer connect to the teensy 36's 2nd USB?
This question revolves around the meaning of 2 words, "Computer" and "Can".
By "Computer", you probably mean USB host. USB has very specific terminology and it's important to be precise when talking about technical matters with such a complicated protocol.
The word "Can" is trickier. Today the only ready-to-use library is USBHost_t36, which only supports using that port in host mode, as you might guess from its name. USB hosts can't talk directly to each other.
There may be some computer-to-computer USB products on the market, which acts as 2 back-to-back USB devices. I have seem some advertised before, but I know nothing about them. I can tell you USBHost_t36 has no driver support for any such USB device, so getting it to work with USBHost_t36 would involve writing a C++ driver class in the library, which in turn would need detailed protocol info. For specialty USB products that use undocumented protocols and have binary-only drivers offered only for Windows, the odds of getting them to work on *any* other platform (even Linux) is slim. You'd need to find a computer-to-computer USB product that's well documented at the protocol level to have any chance...
Until recently, the only other code existing would be in NXP's SDK. We don't support that, and it's probably outside the reach of most people to really use.
Writing the USB stack from scratch is theoretically possible, but it's quite difficult programming and requires a very deep knowledge of USB protocol. I would not advise attempting it.
Teensy 3.6's 2nd port is basically the same hardware as we're using in the Teensy 4 beta test. The PHY is a little different, but the EHCI controller is pretty much identical, but twice as many endpoints supported.
Using the beta code on Teensy 3.6 would be quite a challenge for anyone not already very familiar with the hardware. Today the beta code still leaves quite a lot to be desired, with many features missing. So far, its performance is barely better than the highly optimized code we have for 12 Mbit/sec USB on Teensy 3.x. Over the next couple months, that will change as I work more on the code.
So in time, probably by April or May, there's a pretty strong possibility this new code will get ported back to Teensy 3.6. Hopefully by then we'll also be shipping Teensy 4.0. If you can wait 3-4 months, ether Teensy 3.6 or 4.0 may work out to a really good solution.
If you need something right now, I'd suggest looking at the Beaglebone Black. I have only used it for one project, and I only used it as a USB host, so I'm not 100% sure if it can do USB device. But I recall Jason (from Texas Instruments - the guy behind Beaglebone) talking about that at some point. The BBB also has a feature called PRU which allows high speed I/O, which probably makes it a much better candidate for your project than other Linux SBCs like Raspberry Pi.