LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-25-2014, 07:04 PM   #1
cpt_howdy
LQ Newbie
 
Registered: Feb 2014
Posts: 1

Rep: Reputation: Disabled
I installed vsftpd, and killed my SSH access - AWS server


I would really appreciate some help from the community - I'm just about to leave a job, and I've chosen a bad time to lock myself out of the server...

Salient facts: I am locked out of my Amazon EC2 instance (no SSH access). The instance is fully backed up as an AMI, plus I have both volumes snapshotted from less than 1 hour ago. The data an machine images is therefore secure, and I could, with an extended period of time, simply rebuild my server on a new instance, and then port across our elastic IP and be done with it. However, there are 3 websites on the server, and they depend on both MySQL and Mongo databases, so this route would take a lot of time and pain to get working properly again.

Instead, I want to restore SSH access, so I don't have to do this, but so far my attempts have failed. Because I'm using AWS, I have access to my Linux install by mounting the boot partition using another AWS instance. Through this I've tried a few things to solve the problem, by writing a recovery script and adding a @reboot crontab entry - then dismounting the image and remounting it on the new instance as the boot partition to see if that solves it.
I have this indirect access via the boot partition, so theoretically I should be able to fix this, I just don't know how to.

I've attached my /var/log/secure log file, restricted to the lines that lead up to the point where SSH access dies.
To clarify, when I attempt to connect via SSH, the server appears to accept my private key, but then disconnects me. I am almost certain that this has to do with the fact that I installed vsftpd just prior to the problem occurring, because it looks like when I try to login via SSH, that the request is being routed to vsftpd rather than sshd - though I could be completely wrong about that. I've attached the log, plus my sshd and vsftpd config files - please help!

Contents of /var/log/secure: http://pastebin.com/WMrAjXq4
My vsftpd.conf: http://pastebin.com/UH8q0ENU
My sshd.conf: http://pastebin.com/SEQFWLBz
 
Old 02-26-2014, 09:21 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
If you can edit /etc/ssh/sshd_config...

PermitRootLogin yes
PermitRootLogin forced-commands-only <-- I have no such entry on any of my AWS hosts.
I'd remove/remark it out and restart sshd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh connection frequently get killed by the remote server boubalos Linux - Networking 12 05-08-2012 12:53 AM
Setting up FTP access to vsftpd through RSA/SSH Key mchethan Linux - Newbie 1 02-25-2009 06:02 AM
Using DSL and ssh / ssh-server to access the Windoze desktop GUI On2ndThought Linux - Server 4 11-16-2008 03:17 PM
access rights on vsftpd server bookie Linux - Software 2 05-20-2008 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration