Connect to Heroku using port 443

I am a university student, and all ports except 80, 443 are blocked. I can connect to github through

Host github.com Hostname ssh.github.com Port 443 

git push heroku master gives me this error:

 ssh: connect to host heroku.com port 22: Connection refused fatal: The remote end hung up unexpectedly 

I tried the published solutions here , but I still have no work. Is there a way that I can connect to the hero, expand my sites?

Thank you so much

+3
source share
2 answers

If your SSH port is blocked and you want to click on the hero using an alternative port, you can consider Tunneling .

For tunneling, you need to have an additional computer or server located outside the blocked network and having access to port 22.

In the scenario below, we can use a home PC to tunnel the hero to the server. Since only ports 80 and 443 are allowed on the university network, we can set up a home computer to accept the connection through port 443 and tunnel it to port 22.

On home PC:

PC University:

  • Configure your university computer to resolve the git_tunnel alias to point to localhost on port 9001. Edit ~/.ssh/config and add the following

     # ~/.ssh/config Host git_tunnel Hostname 127.0.0.1 User git Port 9001 
  • Add a new remote alias as tunnel , which will point to git@git _tunnel:{app name}.git

    git remote add tunnel git@git _tunnel:{app name}.git

  • From the university PC, install the tunnel on the PC that is listening on port 443.

    ssh -L 9001:heroku.com:22 -p 443 root@housepc.com

  • Turn around to the hero using the previously created alias tunnel

    git push tunnel master

+4
source

Heroku ssh only works on port 22. There is, however, a plugin that allows you to click through HTTP. However, it does not use git. Instead, you are heroku push .

https://github.com/ddollar/heroku-push

+7
source

All Articles