Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SFTP-only server?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Syldorian
n00b
n00b


Joined: 14 Jan 2004
Posts: 31

PostPosted: Wed Apr 14, 2004 3:41 pm    Post subject: SFTP-only server? Reply with quote

I have SSH running on my box fine. Is there any way to restrict some users to only being able to use SFTP, though? I.e. they have no access to a console?

Thanks for any replies.
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Wed Apr 14, 2004 3:55 pm    Post subject: Reply with quote

What about changing there shell? Or placing them in a chroot jail?
_________________
The true guru is a teacher.
Neil Watson
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Wed Apr 14, 2004 3:57 pm    Post subject: Reply with quote

this is what you need
http://www.sublimation.org/scponly/

xming
Back to top
View user's profile Send private message
nevynxxx
Veteran
Veteran


Joined: 12 Nov 2003
Posts: 1123
Location: Manchester - UK

PostPosted: Wed Apr 14, 2004 4:05 pm    Post subject: Reply with quote

One way I once read is to set their terminal to /dev/null, in the /etc/passwd file. I think ssh should adhire to that.

The problem is you cannot block the port, as it will kill both services, and you cannot just stop all autentication for the same reason. Have a look in the ssh config file, you may be able to tell it not to allow user logons.
_________________
My Public Key

Wanted: Instructor in the art of Bowyery
Back to top
View user's profile Send private message
ozonator
Guru
Guru


Joined: 11 Jun 2003
Posts: 591
Location: Ontario, Canada

PostPosted: Wed Apr 14, 2004 4:29 pm    Post subject: Re: SFTP-only server? Reply with quote

Syldorian wrote:
I have SSH running on my box fine. Is there any way to restrict some users to only being able to use SFTP, though? I.e. they have no access to a console?


I've been using rssh to do this for a while; it's a special shell for only scp/sftp access. It does all I need, and it works exactly as advertised. scponly, as already mentioned here, is an alternative.
Back to top
View user's profile Send private message
Syldorian
n00b
n00b


Joined: 14 Jan 2004
Posts: 31

PostPosted: Wed Apr 14, 2004 7:19 pm    Post subject: Reply with quote

Thanks much for the replies. I emerged scponly. Seems to be working great. <g>
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 14, 2004 9:48 pm    Post subject: Reply with quote

is there an SFTP server that uses the ftp ports?
i mean other then openssh, i want a seperate SFTP server.

They way i might be able to create seperate accounts, without giving ssh.

The other options seem very messy.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
ozonator
Guru
Guru


Joined: 11 Jun 2003
Posts: 591
Location: Ontario, Canada

PostPosted: Wed Apr 14, 2004 10:00 pm    Post subject: Reply with quote

MooktaKiNG wrote:
They way i might be able to create seperate accounts, without giving ssh.


The whole idea of rssh is that a user account would only be allowed to do sftp or scp: such accounts can't do regular ssh and get a normal interactive shell the way a normal, non-restricted user can (scponly also has options for allowing rsync or unison access over ssh, but still no regular shell). So, if you want to create separate accounts, go ahead and do so, giving them rssh or scponly as their shell. Just because it's all managed by sshd, listening to the same port, doesn't reduce the level of security (after all, each ssh connection is handled by a separate, privilege-separated process).

Perhaps I'm not understanding your concern, but this method doesn't seem messy to me. It actually seems a bit neater, since I only need to run one service for both regular and restricted users.
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 14, 2004 10:34 pm    Post subject: Reply with quote

yeh maybe your right.

I think i remember reading that PureFTPd supported encryption. probably using TLS or something.

I can't remember

Has anyone tried it?
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
MooktaKiNG
Guru
Guru


Joined: 11 Nov 2002
Posts: 326
Location: London, UK

PostPosted: Wed Apr 14, 2004 10:35 pm    Post subject: Reply with quote

Oh and i much prefer something like PureFTPd.

This way i can put limits on uploads etc.
_________________
http://www.mooktakim.com
Athlon XP 2001, Giga-Byte GA-7VRXP MB, 640Mb DDR RAM 333MHz, MSI Geforce 4800SE 128Mb DDR, 40x12x48 Liteon CDRW drive, Flower Cooler, ADSL Router
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum