the dwarves listened and shook their beards , for they knew that they must soon venture into that forest and that after the mountains it was the worst of the perils they had to pass before they came to the dragon 's stronghold .