3

I'm trying to push a Rails application up to heroku and it continuously gives me this error:

ssh: connect to host 107.21.95.3 port 22: Connection refused
fatal: Could not read from remote repository.

This worked earlier in the week at both a public wifi location and a private wifi location. I have looked at ssh-connect-to-host-heroku and git-push-heroku-master. Through these two answers I uninstalled and reinstalled the Heroku Toolbelt, added a new SSH key to heroku, and created a new application in heroku to push to.

When I use ssh -T heroku.com or ssh -vT heroku.comI respectively get:

ssh: connect to host 107.21.95.3 port 22: Connection refused

and

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/christinaleuci/.ssh/config
debug1: /Users/christinaleuci/.ssh/config line 2: Applying options for heroku.com
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to 107.21.95.3 [107.21.95.3] port 22.
debug1: connect to address 107.21.95.3 port 22: Connection refused
ssh: connect to host 107.21.95.3 port 22: Connection refused
Community
  • 1
  • 1
Christina Leuci
  • 203
  • 2
  • 18

2 Answers2

1

I had the same error and found out at that SSH was blocked at my office. If you can't SSH to anywhere that's might be your problem, but if you can SSH to somewhere that's not Heroku I'm not sure.

  • When I `ssh git@github.com` I receive this shell access error: `PTY allocation request failed on channel 0 Hi ChristinaLeuci! You've successfully authenticated, but GitHub does not provide shell access. Connection to ssh.github.com closed.` – Christina Leuci Dec 03 '14 at 22:48
1

I have had a lot of problems with keys and Heroku. I started using Heroku Accounts and that has made it a lot easier. Make sure your public key is listed within your account under SSH keys here.

BTW, ssh -v git@heroku.com fails for me when using Heroku Accounts but I am able to use my accounts without issue.

Ken Stipek
  • 1,512
  • 8
  • 12