The proper question isn't "how to make the tab key work properly?". It should be "how can I make the tab key work on my remote session the same way it works on my local machine?"
What you're used to seeing on your local machine is something that Ubuntu bakes into its installation of bash called bash completion. This uses the programmable tab completion options of bash to add tab completion to other commands. On its own,
bash (and most other shells) simply provide file name and path completion.
When you're connecting to another machine using ssh, it isn't ssh which is causing the problem but instead it's the shell you're using on the remote machine -- also probably bash, but probably without the extra tab completion stuff.
On the remote machine, look for
/etc/bash_completion, if it's there, you can load it into your current shell by typing (or putting into a startup file):
If it isn't there, download one of the files from official site and install as instructed on the remote machine.