Your issue is the use of sh -c. When using the -c flag, the next argument is expected to be the full command line that will be expanded by the subshell.
You can try this in a regular shell:
ditto:~% sh -c echo a b c
ditto:~% sh -c 'echo a b c'
a b c
In the first example, echo is being executed correctly, but because only the first argument after -...
Tramp keeps its persistent data in ~/.emacs.d/tramp. You can either remove this file prior starting Emacs, or trash its contents by M-x tramp-cleanup-all-connections any time.
I've tried to reproduce your scenario. I've used my own remote machine (obviously), with a non-standard port. In order to minimize interference with other packages, I have started ...
I cannot reproduce it myself any more.
After repeating this tens of times (closing emacs, restarting remote), I tried switching the remote to the default ssh port (22), and it then worked when not specifying a port. It then worked when specifying port 22 in the properties, and also when moving remote back to port 2221.
I keep the org file on git, and the ...