1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

aws サーバーに接続できない

Posted at

概要

久しぶりにawsでec2を起動したらサブネットとかが消滅していた
(1年の無料期間終わる前に何も確認せずにいろんなリソース使わないっしょwのノリで消したせい)

経緯と原因

サブネットが存在しなかったので新規で作った

image.png

azは特に指定しなかったが、CIDRはエラーになるため、参考値だったりを入力

ここまでは特に問題ない

sshで接続に行くとTimeOutとなってしまう

22番は開けているのにおかしい!!となる

色々みていたところ、サブネットがInternet Gatewayに接続していなかった
外向きの穴がないため、うまくいっていなかった。

  • Internet Gateway 作成/接続:
    • VPC → Internet Gateways → Create → 作成後、対象VPCに Attach。
  • ルートを追加:
    • VPC → Route Tables → サブネットが接続しているやつ → Edit routes → 追加で
    • 送信先: 0.0.0.0/0
    • ターゲット: いまAttachした igw-xxxx
  • 保存。

もう一回sshしたら解決

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?