Deploys not working when using non-standard SSH port

Hi Guys,

I have my staging set up using a non standard SSH port (using ansible_ssh_port=XXX) etc. Provisionng etc. is all fine, but I cannot run the deploy script. I get the below error:

Failed to download remote objects and refs:  ssh: connect to host
port XXX: Connection timed out
fatal: Could not read from remote repository.

It appears the deploy script is trying to connect to using the non standard SSH port I have set up. Is this what is causing it to fail? If I SSH into my staging server and run ssh -T it gives:

ssh: connect to host port XXX: Connection timed out

So SSh forwarding is indeed not working. SSH keys etc. are all correct. Any help please? It did seem to work a few weeks ago, I haven’t changed anything to do with the SSH keys etc. The only change I made was to update the mail.yml settings and reprovision the server.


Ok yes this seems to be the problem because if I SSH into staging and run ssh -T -p 22 it connect fine. Changing ssh_port (sshd/defaults/main.yml) back to 22 fixed it.