LoginSignup
0
1

More than 3 years have passed since last update.

EC2インスタンスへのログイン方法

Posted at

EC2インスタンスへのログインの手順

ホームディレクトリに移動する。

$ cd ~

ホームディレクトリから隠しファイルである「.ssh」というディレクトリ(ファイル名)

$ ls -a

ホームディレクトリから.sshにcdコマンド(絶対パス?)で移動する。

$ cd ~/.ssh

.sshから、以下のコマンドを実行して、EC2インスタンスへのログインする。

$ ssh -i pemキー名 ec2-user@ 自身のIPアドレス

「pemキー名」は、AWSの鍵の名前を指す。

「自身のIPアドレス」は、インスタンス作成時に作成される数字

ログインが完了すると、以下のような画面になる。
https://gyazo.com/d8358a055227c0859543a3e47b016775

※隠しファイルのリストを見たい時は、-aで一覧表示できる。

$ ls -a

また、Finderにおいて、隠しファイルの一覧を表示させるには、

シフトキー + command + .

のコマンドを実行すると、以下のような挙動となる。
https://gyazo.com/045020868a0f15b3e5fab25f5482588e

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