SSH suddenly fails to connect to the server.Connection refused

Asked 1 years ago, Updated 1 years ago, 102 views

I tried various things by referring to the QA site in the past, but it was impossible, please let me know.
The situation suddenly stopped connecting to the server via SSH and SFTP after noon the day before yesterday.
I was able to connect in the morning, the only thing I did on the server in the morning was to edit style.css.
Ping is also unanswered.

The error message is as follows:
▼SSH
Connection denied
▼ SFTP

Server AWS EC2

Port 22 on the server is open, and all IPs can connect.

I tried the following, but the situation remains the same.
·Instance memory expansion t2.micro→t2.medium
·Instance volume expansion 8Gib→80Gib
·Disable fire fall from control panel
·After copying the snapshot volume of the instance in question and attaching it to an instance that can connect successfully, I accessed it, but the result was the same error and I couldn't access it

I'm lost because I can't connect to the server even if I change the sshd setting.
The following was printed in the error log of the instance, but I still can't figure out the cause.
Failed to start Create Volatile Files and Directories.
Failed to start OpenBSD Secure Shell server.
Failed to start Snappy daemon.

I would appreciate it if you could tell me how to solve anything.

Thank you for your cooperation.

aws ssh amazon-ec2

2022-09-29 21:21

2 Answers

You said you attached it to a successful instance, but try mounting the problematic volume on the successful instance.

Once mounted, you can copy the required files to a "successfully connected instance", which you can use to recover from a "successfully connected instance." (If you can, you can repair the "problematic volume" file, but I think it would be faster to copy only what you need.)

I think this defect is caused by a corrupted file related to the SSH server.I think the instance is standing up, so I can't say it's a problem with the AWS machine, so I've tried various things such as rebooting, but I don't think I can recover it.


2022-09-29 21:21

In the case of a bug on the AWS side, restarting the EC2 instance from the AWS management console may recover.If the reboot fails, you can ask for help or a forum to do so.
If you still cannot recover, consider restoring from a backup.


2022-09-29 21:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.