refactor out the ssh manager and the operations of creating files must be done after the user resources is finished