Unable to ssh from an ec2 instance
See original GitHub issueI tried accessing play-with-docker instance using ssh from ec2 instance (can’t do from my local machine because of firewall blocking port 22). I checked the outbound rules but all ports are open.
Following error shows up when I try to ssh a pwd machine,
Permission denied (publickey).
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Resolve "Connection refused" or "Connection timed out ... - AWS
Error message: "ssh: connect to host ec2-X-X-X-X.compute-1.amazonaws.com port 22: Connection refused". This message comes remotely from a host.
Read more >Can't SSH into AWS EC2 instance - Stack Overflow
I can't SSH into my EC2 instances - I am getting a timeout error. I checked the security groups to ensure that SSH...
Read more >Why can't I ssh into my new EC2 Instance? - Server Fault
This has been happening to me on some of my EC2 boxes. In general, it appears that if a process ...
Read more >Unable To Connect Your EC2 Instance Using SSH? - Medium
Select The EC2 Instance that you want connect from SSH. 3.Select the Security group for the EC2 Instance that we are trying to...
Read more >How to troubleshoot SSH connection issues with AWS EC2.
If your EC2 instance is running and trying to SSH with correct IP (there will be a change in IP after each restart),...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is because you need to generate a key locally to connect. Try with
ssh-keygen
I don’t know whats goes on exactly, but I edited “/etc/ssh/sshd_config” in the node to enable root authentication with password and permit port forwarding and reset root password. Those changes didn’t let me to authenticate neither with password nor publickey. Then I rollback my changes, but no success. It seems those changes had a permanent effect on ssh service. Finally I test a new node without any modification and everything was ok.