5
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?

More than 5 years have passed since last update.

【AWS】踏み台EC2から別EC2へssh接続する方法

Posted at

踏み台のEC2からアプリなどの乗っている別EC2にアクセスしたくなった

  1. 接続したいEC2のprivate keyを保存する

    • 場所:踏み台の./ssh
    • 形式:テキストとして貼り付ける
  2. アクセス権を変更する

     chmod 400
    
  3. sshコマンドで接続したいEC2にアクセスする

     ssh -i ~/.ssh/privatekeyname ec2-user@10.1.0.xxx
    
5
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
5
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?