0
0

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 3 years have passed since last update.

ec2簡単にログインできるようにしよう(メモ)

Posted at

##簡単なメモです

毎回EC2にログインの際-i ssh 秘密鍵名.pem ec2-user@IPアドレスを打ち込むのは面倒なのでショートカットできるようにします。
configVimで書き込みします。
下記をターミナルで入力。

% cd ~/.ssh
% vi config

INSERTモードにして書き込んでいきます。
接続先名は簡単なものが楽でいいと思います。

Host 接続先名
  HostName Elastic IPアドレス
  User ec2-user
  IdentityFile ~/.ssh/プライベートキーの名前.pem

もう一度yesと答えたらOKです。

% ssh 接続先名

これで簡単にログインできるようになります。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?