Made the ssh keys code a tad smarter