LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-31-2013, 05:50 AM   #1
Fracker
Member
 
Registered: Mar 2009
Posts: 90

Rep: Reputation: 0
disallow FTP while only allowing SFTP


Hi Guyz,

I configure SFTP server with Chroot, also disallowed user to login via ssh.

Now issue is FTP, i tried to login with the user got on scary result.

Password:
500 OOPS: cannot change directory:/folder
500 OOPS: child died
Connection closed by remote host.

Now how to stop FTP? While using only SFTP.
 
Old 12-31-2013, 06:19 AM   #2
Fracker
Member
 
Registered: Mar 2009
Posts: 90

Original Poster
Rep: Reputation: 0
ok did things like disable port 21 on iptables, and at vsftpd
ftp_enable=no

now ftp is not working but sftp is.. Still not sure where it is secure completely or not.

Also one more thing, i am trying

AllowUsers jim@11.22.33.56

now do i need to add sftp users as well to same configuration?

Last edited by Fracker; 12-31-2013 at 06:28 AM.
 
Old 01-02-2014, 05:23 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Fracker View Post
(..) Now issue is FTP, i tried to login with the user got on scary result.
Code:
Password:
500 OOPS: cannot change directory:/folder
500 OOPS: child died
Connection closed by remote host.
The "cannot change directory" could be a permission issue.


Quote:
Originally Posted by Fracker View Post
Now how to stop FTP? While using only SFTP.
/
Quote:
Originally Posted by Fracker View Post
ok did things like disable port 21 on iptables, and at vsftpd
ftp_enable=no now ftp is not working but sftp is.. Still not sure where it is secure completely or not.
SFTP and FTP(S) are two different protocols usually provided by two different daemons. As far as I know Vsftpd doesn't provide SFTP. If you do not want to provide FTP then the best way to accomplish that is to shut down (and remove?) the FTP daemon.


Quote:
Originally Posted by Fracker View Post
Also one more thing, i am trying
AllowUsers jim@11.22.33.56
now do i need to add sftp users as well to same configuration?
Yes. That kind of makes sense doesn't it? ;-p

Last edited by unSpawn; 01-02-2014 at 10:10 AM. Reason: //fix vBB code tags
 
Old 01-02-2014, 09:39 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Just to follow up on one point:
Quote:
SFTP and FTP(S) are two different protocols usually provided by two different daemons.
You do have login disabled for the "user" accounts that these daemons run under, don't you?
 
  


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
how to create sftp user only in red hat 4 not ftp user ..only sftp user princeu28 Linux - Newbie 1 10-14-2008 08:10 AM
limiting some users to sftp but allowing other to ftp bmeckle Linux - General 2 04-05-2006 07:43 AM
Allowing sftp without giving a shell koningshoed Linux - Security 8 12-14-2005 08:23 PM
Allowing only SFTP access vanibhat Linux - Enterprise 8 06-30-2005 02:10 AM
Disallow ftp juno Linux - General 1 10-04-2002 10:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:13 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