6. Given in a Cartesian coordinate system there are two moving points $P\left(\sec ^{2} \alpha, \operatorname{tg} \alpha\right), Q(\sin \beta, \cos \beta+5)$, where $\alpha, \beta$ are any real numbers. Then the shortest distance between $P$ and $Q$ is $\qquad$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
$6.2 \sqrt{5}-1$.
The trajectory equation of $P$ is $y^{2}=x-1$, and the trajectory equation of $Q$ is $x^{2}+(y-5)^{2}=1$.
To find the shortest distance between $P$ and $Q$, it is only necessary to find the shortest distance from a point on $P$ to $(0,5)$.
Let the point on $P$ be $(x, y)$, and the distance to $(0,5)$ be $d$. Then
$$
\begin{aligned}
d^{2} & =x^{2}+(y-5)^{2} \\
& =\left(1+y^{2}\right)^{2}+y^{2}-10 y+25 \\
& =y^{4}-2 y^{2}+1+5 y^{2}-10 y+5+20 \\
& =\left(y^{2}-1\right)^{2}+5(y-1)^{2}+20 \\
& \geqslant 20 .
\end{aligned}
$$

When and only when $y=1$, $d_{\text {min }}^{2}=20, d_{\text {min }}=2 \sqrt{5}$.
Therefore, the shortest distance between $P$ and $Q$ is $2 \sqrt{5}-1$.