2012-06-23 139 views
0

我使用Heroku的12.04,並試圖運行的ssh:連接到主機heroku.com端口22:連接被拒絕

$ git push heroku master 

,但我得到了一個錯誤:

ssh: connect to host heroku.com port 22: Connection refused 

,如果我嘗試

$ ssh [email protected] 

我得到了同樣的錯誤

我找了在這個問題上的其他問題,也沒有想通出來呢,但是這是一些我已經檢查的事情:

  1. 我已經安裝的OpenSSH服務器

  2. $ service ssh status
    ssh start/running, process 8819

  3. $ service sshd start
    sshd: unrecognized service

  4. $ ssh -vvv localhost
    OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to localhost [127.0.0.1] port 22.
    debug1: connect to address 127.0.0.1 port 22: Connection refused
    ssh: connect to host localhost port 22: Connection refused

  5. 也是我試圖從端口22日sshd_config文件更改爲2222端口和我仍然可以拒絕端口2222 ..

  6. $ sudo netstat -pantu | grep LISTEN
    tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 5691/dnsmasq
    tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 9081/sshd
    tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1063/cupsd
    tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1142/postgres
    tcp6 0 0 :::22 :::* LISTEN 9081/sshd
    tcp6 0 0 ::1:631 :::* LISTEN 1063/cupsd

任何人都可以幫我嗎?

+0

你不需要'openssh-server'。它是允許遠程訪問您的計算機的模塊。所以,你選中的選項很可能不是你所遇到的問題。你可以添加命令'git config --list'的輸出 – Ankit

回答

2

經過多次嘗試生成密鑰部署heroku。我刪除了我的機器(Ubuntu)的工具欄,然後再次手動安裝並添加了一個新的密鑰。

+0

如何從ubuntu卸載工具欄?有同樣的問題! – streetlight

+0

在這裏找到詳細信息 - http://stackoverflow.com/questions/15203840/heroku-trouble-uninstall-reinstall-heroku-toolbelt-ubuntu – streetlight

0

運行ssh -v [email protected]查看哪些IP正在

107.21.95.3爲我工作 在~/.ssh創建配置文件,如果你沒有vi ~/.ssh/config:

Host heroku.com 
User yourusername 
Hostname 107.21.95.3 
PreferredAuthentications publickey 
IdentityFile ~/.ssh/id_rsa 
port 22 
0

我有這樣的問題後,我一直在做備份SSH。

幫助重新啓動客戶機。

相關問題