質問編集履歴
6
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
1: from /Users/uraokayuutarou/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
|
58
58
|
|
59
|
-
/Users/uraokayuutarou/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as Yutaro.Uraoka@
|
59
|
+
/Users/uraokayuutarou/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as Yutaro.Uraoka@xx.xxx.xx.xx: Authentication failed for user Yutaro.Uraoka@xx.xxx.xx.xx (SSHKit::Runner::ExecuteError)
|
60
60
|
|
61
61
|
(Backtrace restricted to imported tasks)
|
62
62
|
|
5
追加で試したこと
test
CHANGED
File without changes
|
test
CHANGED
@@ -104,6 +104,14 @@
|
|
104
104
|
|
105
105
|
|
106
106
|
|
107
|
+
ssh-copy-id を使用して登録しようとしても手動で登録しようとしてもうまくいきませんでした。
|
108
|
+
|
109
|
+
秘密鍵はキーペアで作成しているものの、公開鍵はどう設定して良いのかわからない状態で終了しています。
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
107
115
|
```terminal
|
108
116
|
|
109
117
|
uraokayuutarou@uraokayuutarou-no-MacBook .ssh % ssh -i xxxxxxxx.pem ec2-user@54.248.24.69
|
@@ -222,6 +230,42 @@
|
|
222
230
|
|
223
231
|
|
224
232
|
|
233
|
+
```terminal
|
234
|
+
|
235
|
+
https://aws.amazon.com/amazon-linux-2/
|
236
|
+
|
237
|
+
[ec2-user@ip-172-31-45-251 ~]$ mkdir .ssh
|
238
|
+
|
239
|
+
mkdir: ディレクトリ `.ssh' を作成できません: File exists
|
240
|
+
|
241
|
+
[ec2-user@ip-172-31-45-251 ~]$ touch .ssh/authorized_keys
|
242
|
+
|
243
|
+
[ec2-user@ip-172-31-45-251 ~]$ chmod 700 .ssh
|
244
|
+
|
245
|
+
[ec2-user@ip-172-31-45-251 ~]$ chmod 600 .ssh/authorized_keys
|
246
|
+
|
247
|
+
[ec2-user@ip-172-31-45-251 ~]$ cat ~/.ssh/id_rsa.pub | ssh -i xxxxxxxxx.pem ec2-user@xx.xxx.xx.xx 'cat >> .ssh/authorized_keys'
|
248
|
+
|
249
|
+
Warning: Identity file xxxxxxx.pem not accessible: No such file or directory.
|
250
|
+
|
251
|
+
The authenticity of host '54.248.24.69 (54.248.24.69)' can't be established.
|
252
|
+
|
253
|
+
ECDSA key fingerprint is SHA256:lLzqkqg3f5NLltGU++DHfcxavWesbyq92o4DDfV3Iw8.
|
254
|
+
|
255
|
+
ECDSA key fingerprint is MD5:e0:7f:2f:a5:50:eb:3f:45:bc:b7:bf:31:8d:47:50:34.
|
256
|
+
|
257
|
+
Are you sure you want to continue connecting (yes/no)? y
|
258
|
+
|
259
|
+
Please type 'yes' or 'no': y
|
260
|
+
|
261
|
+
Please type 'yes' or 'no': y
|
262
|
+
|
263
|
+
Please type 'yes' or 'no':
|
264
|
+
|
265
|
+
```
|
266
|
+
|
267
|
+
|
268
|
+
|
225
269
|
### 補足情報(FW/ツールのバージョンなど)
|
226
270
|
|
227
271
|
|
@@ -338,27 +382,23 @@
|
|
338
382
|
|
339
383
|
|
340
384
|
|
341
|
-
|
385
|
+
|
342
386
|
|
343
387
|
set :application, 'nostalgia'
|
344
388
|
|
345
389
|
|
346
390
|
|
347
|
-
# どのリポジトリからアプリをpullするかを指定する
|
348
|
-
|
349
391
|
set :repo_url, 'git@github.com:uraokayutaro1990/nostalgia.git'
|
350
392
|
|
351
393
|
|
352
394
|
|
353
|
-
# バージョンが変わっても共通で参照するディレクトリを指定
|
354
|
-
|
355
395
|
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
|
356
396
|
|
357
397
|
|
358
398
|
|
359
399
|
set :rbenv_type, :user
|
360
400
|
|
361
|
-
set :rbenv_ruby, '2.6.5p114'
|
401
|
+
set :rbenv_ruby, '2.6.5p114'
|
362
402
|
|
363
403
|
|
364
404
|
|
@@ -370,13 +410,13 @@
|
|
370
410
|
|
371
411
|
|
372
412
|
|
373
|
-
|
413
|
+
|
374
414
|
|
375
415
|
set :unicorn_pid, -> { "#{shared_path}/tmp/pids/unicorn.pid" }
|
376
416
|
|
377
417
|
|
378
418
|
|
379
|
-
|
419
|
+
|
380
420
|
|
381
421
|
set :unicorn_config_path, -> { "#{current_path}/config/unicorn.rb" }
|
382
422
|
|
@@ -384,7 +424,7 @@
|
|
384
424
|
|
385
425
|
|
386
426
|
|
387
|
-
|
427
|
+
|
388
428
|
|
389
429
|
after 'deploy:publishing', 'deploy:restart'
|
390
430
|
|
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
|
57
57
|
1: from /Users/uraokayuutarou/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
|
58
58
|
|
59
|
-
/Users/uraokayuutarou/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as Yutaro.Uraoka@54.248.24.69: Authentication failed for user Yutaro.Uraoka@
|
59
|
+
/Users/uraokayuutarou/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as Yutaro.Uraoka@54.248.24.69: Authentication failed for user Yutaro.Uraoka@xx.xxx.xx.xx (SSHKit::Runner::ExecuteError)
|
60
60
|
|
61
61
|
(Backtrace restricted to imported tasks)
|
62
62
|
|
@@ -106,7 +106,7 @@
|
|
106
106
|
|
107
107
|
```terminal
|
108
108
|
|
109
|
-
uraokayuutarou@uraokayuutarou-no-MacBook .ssh % ssh -i
|
109
|
+
uraokayuutarou@uraokayuutarou-no-MacBook .ssh % ssh -i xxxxxxxx.pem ec2-user@54.248.24.69
|
110
110
|
|
111
111
|
Last login: Tue Nov 10 06:24:37 2020 from 137.140.5.103.wi-fi.wi2.ne.jp
|
112
112
|
|
@@ -140,7 +140,7 @@
|
|
140
140
|
|
141
141
|
Could not open a connection to your authentication agent.
|
142
142
|
|
143
|
-
[ec2-user@ip-172-31-45-251 ~]$ chmod 600
|
143
|
+
[ec2-user@ip-172-31-45-251 ~]$ chmod 600 xxxxxxxxx.pem
|
144
144
|
|
145
145
|
chmod: `nostalgia2020.pem' にアクセスできません: No such file or directory
|
146
146
|
|
@@ -152,7 +152,7 @@
|
|
152
152
|
|
153
153
|
authorized_keys id_rsa id_rsa.pub known_hosts
|
154
154
|
|
155
|
-
[ec2-user@ip-172-31-45-251 .ssh]$ chmod 600
|
155
|
+
[ec2-user@ip-172-31-45-251 .ssh]$ chmod 600 xxxxxxxxxx.pem
|
156
156
|
|
157
157
|
chmod: `nostalgia2020.pem' にアクセスできません: No such file or directory
|
158
158
|
|
@@ -162,7 +162,7 @@
|
|
162
162
|
|
163
163
|
Connection to 54.248.24.69 closed.
|
164
164
|
|
165
|
-
uraokayuutarou@uraokayuutarou-no-MacBook .ssh % ssh -i
|
165
|
+
uraokayuutarou@uraokayuutarou-no-MacBook .ssh % ssh -i xxxxxxxxxx0.pem ec2-user@54.248.24.69
|
166
166
|
|
167
167
|
Last login: Tue Nov 10 06:39:30 2020 from 137.140.5.103.wi-fi.wi2.ne.jp
|
168
168
|
|
@@ -366,7 +366,7 @@
|
|
366
366
|
|
367
367
|
set :ssh_options, auth_methods: ['publickey'],
|
368
368
|
|
369
|
-
keys: ['~/.ssh/
|
369
|
+
keys: ['~/.ssh/xxxxxxxxxx.pem']
|
370
370
|
|
371
371
|
|
372
372
|
|
3
タイトル補足
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
EC2にCapistranoを導入して自動デプロイの確認中にsshのエラーが発生しました。
|
1
|
+
EC2にCapistranoを導入して自動デプロイの確認中にsshのエラーが発生しました。ssh-add -l で確認してもsshを確認することが出来ませんでした。
|
test
CHANGED
File without changes
|
2
ssh-add -lの実行結果
test
CHANGED
File without changes
|
test
CHANGED
@@ -188,6 +188,36 @@
|
|
188
188
|
|
189
189
|
|
190
190
|
|
191
|
+
|
192
|
+
|
193
|
+
```
|
194
|
+
|
195
|
+
登録されているsshの鍵を確認しようとしましたが、
|
196
|
+
|
197
|
+
接続を開くことができませんでした。
|
198
|
+
|
199
|
+
個人開発のディレクトリに入って実行もしてみましたが、
|
200
|
+
|
201
|
+
同じエラー(Could not open a connection to your authentication agent.)が出てきました。
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
```termnal
|
206
|
+
|
207
|
+
https://aws.amazon.com/amazon-linux-2/
|
208
|
+
|
209
|
+
[ec2-user@ip-172-31-45-251 ~]$ ssh-add -l
|
210
|
+
|
211
|
+
Could not open a connection to your authentication agent.
|
212
|
+
|
213
|
+
[ec2-user@ip-172-31-45-251 ~]$ cd /var/www/nostalgia
|
214
|
+
|
215
|
+
[ec2-user@ip-172-31-45-251 nostalgia]$ ssh-add -l
|
216
|
+
|
217
|
+
Could not open a connection to your authentication agent.
|
218
|
+
|
219
|
+
[ec2-user@ip-172-31-45-251 nostalgia]$
|
220
|
+
|
191
221
|
```
|
192
222
|
|
193
223
|
|
1
タイトルの変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
EC2に自動デプロイ
|
1
|
+
EC2にCapistranoを導入して自動デプロイの確認中にsshのエラーが発生しました。
|
test
CHANGED
File without changes
|