- Newest
- Most votes
- Most comments
Hello,
Thank you for using Lightsail.
Here are some ideas to help debug:
- Navigate to the "Connect" tab of the instance and verify that the key pair name in bold below the "Connect using your own SSH client" section is the same as the one you've downloaded and are attempting to use to connect.
- Ensure the .pem key has the correct permissions set, otherwise the server will refuse connection. On Linux or Mac you can set the correct permissions with the following command
chmod 400 ~/key-name.pem
. Details for connecting with Putty as you mentioned can be found here: https://docs.aws.amazon.com/quickstarts/latest/vmlaunch/step-2-connect-to-instance.html
Let us know if either of those helps, or if you are still stuck connecting.
Regards,
Jonathan
unfortunally, i have the exactly same issue... i tried to change the keys, restart the computer - change the computer - always the same error "server refused our key" - the only thing which works is the ssh client via browser - no connection via sftp or navicat/mysql as before (it worked well, till i destroyed the apache conf files...) therefore i terminated the old instance and build a new one - then the ssh putty client stopped connecting
any ideas - there is nothing out in the internet - not for this problem - is that a lightsail problem??
Have you attempted to update the permissions as mentioned above by JonathanH-AWS?
Are there any additional details you can provide regarding the error message that you are seeing?
In order to get a clearer understanding of what may be happening, you can try editing your
/etc/ssh/sshd_config
file and change the log level to
LogLevel DEBUG3
Once you have done so and after you attempt to connect again, more specific errors should be output to
/var/log/secure
Regards,
Jordan
I have the same problem on osx. Permissions are correct, and using -v option, I can see it cycling through all the keys, and none of them work. I also tried using the default key, although the lightsail console for the instance shows it as being associated with the custom key. (key was generated during the instance creation; not an uploaded key). I cannot get into the instance except for the "lacking" web shell console, and cannot run many commands without getting some weird 404 response which terminates the session.
same problem since weeks.
still no change. "Server refused our key"
I have another LAMP instance, where everything is working well
Still stuck connecting
No change at all. Each trial same result. Really need serious help.
why is my first instance working smoothly from the beginning (in the same region), the new one absolutely not?
The first LAMP is based on UBUNTU, the second one on DEBIAN.
So maybe user - name is changed from ubuntu to admin.
But has nothing to do with "server refused our key"
As you wrote: "...key pair name in bold below the "Connect using your own SSH client" section is the same as the one you've downloaded.."
its...-eu-central-1 ... so correct!
What can I do?
This is not really helpful
/etc/ssh/sshd_config results in : Permission denied
Thank you very much!
Edited by: Edgar1004 on Sep 26, 2020 7:19 AM
I found the solution and would like to share this message to all of you who had same problem, desperately searching for solving.
Lightsail LAMP doen't come now based on UBUNTU, it's based now - without any announcement - on DEBIAN
Here is the crux.
DEBIAN asks for another User-name and this is not "admin" like you see in the discription. It is "bitnami"
And voila... it works
I think you should check this pattern which is discussed in the documentation here: https://aws.amazon.com/premiumsupport/knowledge-center/lightsail-resolve-ssh-console-errors/ .
Relevant content
- Accepted Answerasked 5 months ago
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago