Wondering, wouldn't curl make more sense? Supports more protocols and outputs the key on stdout by default :-)