I am not sure what the problem is, but, I constantly use the SSH protocol over Tor, specifically over whonix-gateway with a custom workstation (using qubes-whonix).
Running the command on my custom workstation (attached to the default whonix-gateway), for example “ssh -v -p 22 username@server.com” works perfectly fine.
Sorry if this answer is not of any kind.