amazon-web-services


Cannot access Amazon EC2 instance after changing sshd_config file (deadlock)


I was trying to access Amazon EC2 instance without using keypairs (I was doing some tests with Dreamweaver)
So, I had a marvelous ideia of changing sshd_config file.
sudo nano /etc/ssh/sshd_config
And I change the PasswordAuthentication line to:
Match User ubuntu
PasswordAuthentication yes
After restarting I got a sad surprise. I cannot access my machine anymore. And even worst I had only one user (ubuntu) on this instance.
My question is:
How can I back to original setting ( roolback sshd_config file) if I cannot access my terminal?
Loosing access to an Amazon EC2 instance is a common encounter - how to approach this situation when you don't know the reason yet is addressed in Eric Hammond's excellent summary Solving: "I can't connect to my server on Amazon EC2".
However, since you already now that the problem is permission related, you can apply his respective instructions Fixing Files on the Root EBS Volume of an EC2 Instance right away, see my answer to the related question Fixing Amazon EC2 Permissions for a short summary of this approach.
Good luck!

Related Links

Can I get credentials by AWS IAM Role published by another aws account?
AWS asking me for a passphrase for key: EC2
How to define IAM Policy for a user to have programmatic full or limited access only for specific dynamodb tables?
Good deployment in aws with Symfony
How to get the end time of AWS EBS volume snapshot ? I want to find out the time when the snapshot completed
copy specific data in one s3 bucket to another bucket using data pipeline
AWS CodeDeploy using Github Failing
Tool to orchestrate execution of AWS CloudFormation templates
Updating ElasticSearch mappings field type with existing data
Is there a way to use the CLI to configure an Alexa skill?
Why won't my node / Heroku app connect to RDS?
Amazon Redshift - Replication - Data load Vs Query Performance Issues
Cloudfront CNAME or DNS CNAME? [duplicate]
Can import certificate in london but not in N. Virginia
Strange behaviour of CPU balance in t2.2xlarge AWS EC2 instance [duplicate]
Connecting existing RDS to Elastic Beanstalk

Categories

HOME
python-2.7
android-espresso
automapper
workflow
couchdb
foaf
apk
mongoid
twitter-fabric
google-webmaster-tools
fogbugz
openflow
moodle-api
apache-kafka-connect
navigation
ui-automation
elastic-load-balancer
driver
fasm
business-intelligence
complexity-theory
squid
global-variables
renderscript
parceler
adminlte
amazon-mws
activeadmin
multi-upload
pdf.js
python-appium
unrar
hdmi
openbravo
annotation-processing
d3.js-v4
memory-fences
snap-framework
quick-nimble
plantuml
serversocket
autoencoder
numerics
eclipse-gmf
mv
get-event-store
data-uri
access-denied
spooler
web-inspector
cloudwatch
supertest
mongodb-aggregation
test-data
mpmovieplayercontroller
prefetch
multi-touch
bigdecimal
system.web.optimization
clp
traversable
oci
piping
qpixmap
unsigned
smart-tv
apache-commons-digester
android-handler
whitespace-language
mod-auth-openidc
google-hangouts
multivariate-testing
maven-central
mfmessagecomposeview
forio-contour
air-native-extension
preorder
django-settings
saga
django-facebook
oembed
itunes-sdk
playorm
wndproc
sfinae
nsfont
glassfish-esb
django-pagination
odac
ixmldomdocument
bucket
tacit-programming
rakudo
synthesizer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App