2 Answers
- Newest
- Most votes
- Most comments
1
Hello.
Based on the message content, sshd failed to start, causing SSH connection failure.
Although it depends on the EC2's OS, connection is possible through Systems Manager Session Manager, so please connect to EC2 and reconfigure the sshd settings.
Please check the content of the following document and configure the settings.
https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html
0
Do you have port 22 open in the security group of the EC2, if not you will need to allow in the security group. Also, it's possible you have duplicate Subsystem sftp definition causing the issue. To confirm,
- login to the EC2 via SSM
- open /etc/ssh/sshd_config in nano or vi
- check if you have incorrect or duplicate reference to subsystem
- modify the config and restart -
sudo systemctl restart sshd - Recheck connectivity
Relevant content
asked 3 years ago
asked 3 years ago
asked 4 years ago
