1

I created a Heroku account yesterday, and uploaded a website, updating it multible times. But today when I tried to upload a new version it did'nt work, it just keeps giving me this error message:

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

I tried to restart the heroku server, my own computer, create new keys using: http://devcenter.heroku.com/articles/keys

If I go ssh -vvv mail@adress:

OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to  [195.128.174.124] port 22.
debug1: connect to address 195.128.174.124 port 22: Connection refused
ssh: connect to host  port 22: Connection refused

What can I do to make it work?

jakobk
  • 1,120
  • 1
  • 14
  • 26
  • Is this a duplicate of http://stackoverflow.com/questions/4049900/cannot-push-git-to-remote-repository-ssh-error – Neil Middleton Jan 05 '12 at 13:17
  • No .. I dont think it's the same problem.. tried ssh -v git@heroku.com gived me this error: shell request failed on channel 0 – jakobk Jan 05 '12 at 13:41
  • tried removing all keys (from heroku and local) and logged in with heroku login .. still dosen't work.. – jakobk Jan 05 '12 at 14:24
  • has anything else changed with your network configuration? – Neil Middleton Jan 05 '12 at 14:30
  • No ... I am on the exact same network.. tried to disable all firewalls, and even tried another wifi network .. still dosen't work is .. this is the full error message... is it the right host ? - should'nt it be heroku ? ssh: connect to host jakobkumar.com port 22: Connection refused fatal: The remote end hung up unexpectedly – jakobk Jan 05 '12 at 14:42
  • I would contact Heroku support. Something isn't right here. – Neil Middleton Jan 05 '12 at 15:50

2 Answers2

3

I have seen this problem in the past and the problem is either the hosted app location is incorrect or the security keys are missing/corrupt. The hostname you have seems odd. Unless you have that domain mapped out to the heroku hosted app. Typically heroku app url would be something like herokuapp.com/someapname

But if you have a DNS mapping in place, please ignore that comment. But do have someone cross-check the key installation steps and make sure they are in sync with the heroku guidelines.

Tabrez
  • 3,424
  • 3
  • 27
  • 33
  • thanks! - I think you are right.. the host is not jakobkumar.com .. I think it should be jakobkumar.herokuapp.com .. where do I change it ? – jakobk Jan 05 '12 at 16:37
  • Solved it by git remote add heroku git@heroku.com:newname.git (http://devcenter.heroku.com/articles/keys) just took me one day to figure that one out : ) – jakobk Jan 05 '12 at 17:02
0

I had been working on this for hours trying to figure out how I could suddenly have a closed port 22, etc. when literally 5 hours ago everything was working and nothing had changed.

Finally I just reset my Git repo on Heroku and repushed everything. Still no idea what happened.

heroku plugins:install heroku-repo
heroku repo:reset --app appname
james
  • 3,989
  • 8
  • 47
  • 102