Dokku: Push on a different ssh port than 22

Created on 19 Feb 2016  路  3Comments  路  Source: dokku/dokku

For my server security, i change my ssh port ip. so it's not 22 but 1337 ( for exemple)

When i want to add remote my dokku, i cannot find the right syntax.
git remote add dokku@myip:myapp
i have a error : ssh: connect to host myip port 22: Connection refused
i try with : git remote add dokku@myip:1337:myapp or git remote add dokku@myip:1337/myapp

Any solution ?

question

Most helpful comment

alternative: git remote add ssh://dokku@myip:myport/myapp

All 3 comments

You'll need to setup a custom local ~/.ssh/config like so:

Host my-dokku-host
  Hostname myip
  Port 1337

And then use my-dokku-host as the remote, without the port.

alternative: git remote add ssh://dokku@myip:myport/myapp

alternative: git remote add ssh://dokku@myip:myport/myapp

When i did this, dokku creates an app with the port number. I think the answer from @josegonzalez is the correct one.

Was this page helpful?
0 / 5 - 0 ratings