SSH:连接到Heroku主机的22端口被拒绝了。

3

我正在尝试将一个Rails应用程序推送到Heroku,但它不断地给我这个错误:

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

这个问题在本周早些时候在公共wifi和私人wifi地点都能够解决。我查看了ssh-connect-to-host-herokugit-push-heroku-master。通过这两个答案,我卸载并重新安装了Heroku Toolbelt,向heroku添加了一个新的SSH密钥,并创建了一个新的应用程序来推送。
当我使用ssh -T heroku.comssh -vT heroku.com时,分别得到以下结果:
ssh: connect to host 107.21.95.3 port 22: Connection refused

并且

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
2个回答

1
我遇到了同样的错误,并发现在我的办公室中SSH被阻止了。如果您无法SSH到任何地方,那可能是您的问题,但如果您可以SSH到某个地方而不是Heroku,我就不确定了。

当我执行 ssh git@github.com 时,我收到了这个 shell 访问错误:通道 0 上的 PTY 分配请求失败 你好 ChristinaLeuci!你已经成功验证,但 GitHub 不提供 shell 访问。 与 ssh.github.com 的连接已关闭。 - Christina Leuci

1
我在使用Heroku时遇到了很多密钥方面的问题。我开始使用Heroku Accounts,这使得处理变得容易了很多。请确保你的公钥在此处的SSH密钥下列出

顺便说一下,当我使用Heroku Accounts时,ssh -v git@heroku.com会失败,但我可以毫无问题地使用我的账户。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接