SSH issue while connecting to my instance by using Git Bash

0

Dell@DESKTOP-NMLG1 MINGW64 ~/Downloads (main) $ ssh -i "site.pem" -p 9229 root@ec2-x.x.x.x.ap-south-1.compute.amazonaws.com root@ec2-15-207-1-236.ap-south-1.compute.amazonaws.com's password: Permission denied, please try again.

1回答
0
承認された回答

Hello.

Is "root" the correct login user for SSH?
Basically, I think the root user is denied connection via SSH.
If "PermitRootLogin" in "sshd_config" is set to "yes", it will be allowed, but if it is set to "no", it will be denied.

Isn't the private key being used the default user private key of the EC2 OS?
The default user varies depending on the OS, but I think it should be the user listed in the document below.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html#ami-default-user-names

profile picture
エキスパート
回答済み 9ヶ月前
profile picture
エキスパート
レビュー済み 9ヶ月前
profile pictureAWS
エキスパート
レビュー済み 9ヶ月前
  • Yes, root is the correct login, we are facing this issue from recent times

  • Is "PermitRootLogin" set to "yes" in the SSH configuration file? Also, do the fingerprints of the public key and private key you are setting match? There may also be other issues such as public key or private key permissions issues. We recommend that you check the SSH log in the following file.

    /var/log/secure
    
  • To configure ssh configration file, via aws console also its not allowing and cli is also due permission denied message. So looking if there is an option

  • Can't you temporarily connect using Systems Manager Session Manager or something like that? https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-prerequisites.html
    Although the OS that can be used is limited, I think SSH with EC2 Instance Connect is also possible. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-methods.html

  • I connected to the server using Session Manager. However, when attempting to log in via the command line interface (CLI), I encountered a "permission denied" error. I had already configured the sshd_config file by enabling root authentication login (PermitRootLogin: yes).

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ