Fix pkg ssh by creating a fetch(3) like api