Germany did put U-boats off of the US East Coast. It would probably be a one way trip to put one off of the Brooklyn docks. If they had two and used the first to clear a path for the second, it could have worked.
Rest assured that if this alternate history scenario had occurred historians would not be talking about the inefficiency of the attack, they would be talking about the most devastating attack that Germany was able to conduct against Americans on their own soil during the war. It would have completely changed the American mindset and culture forever.