There technically is no way to sell ships in No Man's Sky. At least not directly. You need to instead convert them into trade materials which you can then sell at any Galactic Trade Terminal.