The pre-installed sftp binary on macOS sucks. When I use my ubuntu machine, sftp has glorious things like a history and tab completion. I've looked around, and cannot tell a clear cut path to upgrading the binary. Has anyone done this? How?
Install homebrew a macOS package manager. https://brew.sh/
HomeBrew is most often mentioned these days. sftp appears to be one of the programs you can download.
other package managers are: MacPort -- BSD licenses Fink -- GNU General Public License
I'd figure out what sftp client Ubuntu uses and look around for the macOS version.
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.