The URL for ssh remotes should be prefixed with ssh:// and the username should be git (Stash will find the correct key for your hannibal user automatically). The full form of the URL is:
ssh://git@server:7999/project/repo.git
For http URLs, you use the username and the http port (7990 by default)