There isn't any 'ideal' focal length for portraiture. It really depends on what you want to achieve. That said, the common focal lengths however, that most people invariably use, would fall between the 85-135mm range outdoors for full to half body crop shots, and at least a 180mm for a tight head crop shot.
Personally, I use my 85mm as often as my 20mm, the only 2 lenses I find useful for the portraiture I do.
The 85mm allows me to maintain a closer distance between myself and the model, to facilitate communication.
The 20mm allows expansive environmental portraits, which appeals more to me than the usual head and shoulders shot.