LoginSignup
0
0

More than 3 years have passed since last update.

ターミナルでインスタンスへログインできなかった

Posted at

AWSにアプリケーションをデプロイしようと思い
インスタンスへ下記のようにログインしたらエラーになる

.ssh % ssh -i sample01.pem ec2-user@54.196.78.41 

と入力すると

.ssh/config: line 5: Bad configuration option: idenityfile
.ssh/config: terminating, 1 bad configuration options

このようなエラーが・・・
sshの5行目の設定がおかしいと言われているので設定ファイルを開く

.ssh % vi /.ssh/config

下記のような設定ファイルが開く

Host sample01_key_rsa
  HostName パブリックIP
  Port 22
  User ユーザ名
  IdenityFile ~/.ssh/sample01_key_rsa

自分の場合は5行目に正しくは
IdentityFile と記載するところを
IdenityFile とスペルが間違っていた

これを正しく書き換えるとログインできた

※ちなみにこの設定ファイルはiで編集モードに入れて終わったら
Esc → Shift+zzで保存できる

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