0

デプロイしたいが、エラーメッセージが発生する。
ちなみに、$ssh 127.0.0.1を実行したところ、ssh: connect to host 127.0.0.1 port 22: Connection refusedのエラーメッセージが発生する。

何が原因なのかわからないです。教えてもらえないでしょうか?

1. 環境

rails 5, unicorn, nginx, capistrano, ubuntu14.04

2. 実行したコマンド

bundle exec cap staging deploy:check

3. エラー内容

00:00 git:wrapper
      01 mkdir -p /tmp
<Thread:0x00007fa5e9275448@/Users/takashi_kageyama/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    1: from /Users/takashi_kageyama/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/takashi_kageyama/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as [email protected]: Authentication failed for user [email protected] (SSHKit::Runner::ExecuteError)
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: Authentication failed for user [email protected]


Caused by:
Net::SSH::AuthenticationFailed: Authentication failed for user [email protected]

Tasks: TOP => deploy:check => git:check => git:wrapper
(See full trace by running task with --trace)

1 件の回答 1

0

ssh 127.0.0.1と実行すると以下のエラーが発生するということは、sshdが
起動されていないかインストールされていないと思います。

    ssh: connect to host 127.0.0.1 port 22: Connection refused

(インストールして)起動することで事象解消しないでしょうか?

4
  • "ssh"をインストールしましたが、解消しませんでした。gemで"capistrano"をインストールした時に"sshkit"がインストールされいたようですが・・・。ちなみに、sshの起動状況の確認をしようとしましたが、よく分かりませんでした。
    – takashi
    2018年5月6日 10:48
  • やっぱり、"ssh"関連が問題となっているみたいなので、"unix"関連を勉強してみます。・・・問題を解決する方向性は、合っているのかな?
    – takashi
    2018年5月6日 10:53
  • sshdが起動しているかどうか確認するのは必要なので、方向性としてはあっていると思います。
    – user20098
    2018年5月6日 12:10
  • ありがとございます。もう少し、絞り込んだ質問できるよう勉強してみます。
    – takashi
    2018年5月7日 11:24

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。