refactoring to support switch chatter flavours and ssh support added