Networking Forums

Networking Forums > Computer Networking > Linux Networking > Deny ssh but allow ftp

Reply
Thread Tools Display Modes

Deny ssh but allow ftp

 
 
Robert
Guest
Posts: n/a

 
      09-19-2003, 03:55 PM
Hi,

How can i configure my server so that a specific user can't
login on my ssh, but can login to my ftp server? I've tried
to set shell on /sbin/nologin for that user, but ftp stopped
working then too. I am using redhat 9 with OpenSSH and vsftpd.

Thank you in advance,

Robert Mens
 
Reply With Quote
 
 
 
 
Rich Piotrowski
Guest
Posts: n/a

 
      09-19-2003, 07:21 PM
On Fri, 19 Sep 2003 17:55:07 +0200, Robert <(E-Mail Removed)> wrote:

>Hi,
>
>How can i configure my server so that a specific user can't
>login on my ssh, but can login to my ftp server? I've tried
>to set shell on /sbin/nologin for that user, but ftp stopped
>working then too. I am using redhat 9 with OpenSSH and vsftpd.
>
>Thank you in advance,
>
>Robert Mens



hosts.allow
hosts.deny


Rich Piotrowski

To E-mail use: rpiotro(at)wi(dot)rr(dot)com
 
Reply With Quote
 
Jeroen Geilman
Guest
Posts: n/a

 
      09-19-2003, 07:25 PM
Robert wrote:

> Hi,
>
> How can i configure my server so that a specific user can't
> login on my ssh, but can login to my ftp server? I've tried
> to set shell on /sbin/nologin for that user, but ftp stopped
> working then too. I am using redhat 9 with OpenSSH and vsftpd.


man sshd_config - AllowUsers

But really...

--
Jeroen Geilman

Gentoo 1.4 rc4

 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      09-19-2003, 10:08 PM
On Fri, 19 Sep 2003 17:55:07 +0200, Robert
<(E-Mail Removed)> wrote:
> Hi,
>
> How can i configure my server so that a specific user can't
> login on my ssh, but can login to my ftp server? I've tried
> to set shell on /sbin/nologin for that user, but ftp stopped
> working then too. I am using redhat 9 with OpenSSH and vsftpd.
>

echo /sbin/nologin >> /etc/shells


--
Commander Spiral Pyjama Pseudo-Rhinocerous Feline Thingamajig Bill Marcum
(the First)
Ozy and Millie Name Generator http://heifong.phase.org/omname.php
 
Reply With Quote
 
dave
Guest
Posts: n/a

 
      09-20-2003, 04:15 AM
Bill Marcum wrote:

> On Fri, 19 Sep 2003 17:55:07 +0200, Robert
> <(E-Mail Removed)> wrote:
>> Hi,
>>
>> How can i configure my server so that a specific user can't
>> login on my ssh, but can login to my ftp server? I've tried
>> to set shell on /sbin/nologin for that user, but ftp stopped
>> working then too. I am using redhat 9 with OpenSSH and vsftpd.
>>

> echo /sbin/nologin >> /etc/shells
>
>


I take you also do not have telnet running
So
in /etc/ssh/sshd_config
add the line
DenyUsers john,sam,tripper etc...
from man sshd_config

DenyUsers
This keyword can be followed by a list of user name patterns,
separated by spaces. Login is disallowed for user names that
match one of the patterns. ‘*’ and ‘’? can be used as
wildcards
in the patterns. Only user names are valid; a numerical user
ID
is not recognized. By default, login is allowed for all users.
If the pattern takes the form USER@HOST then USER and HOST are
separately checked, restricting logins to particular users from
particular hosts.



 
Reply With Quote
 
Paul Lutus
Guest
Posts: n/a

 
      09-20-2003, 05:19 PM
Bill Marcum wrote:

> On Fri, 19 Sep 2003 17:55:07 +0200, Robert
> <(E-Mail Removed)> wrote:
>> Hi,
>>
>> How can i configure my server so that a specific user can't
>> login on my ssh, but can login to my ftp server? I've tried
>> to set shell on /sbin/nologin for that user, but ftp stopped
>> working then too. I am using redhat 9 with OpenSSH and vsftpd.
>>

> echo /sbin/nologin >> /etc/shells


Didn't you mean:

# cat /sbin/nologin >> /etc/shells

--
Paul Lutus
http://www.arachnoid.com

 
Reply With Quote
 
Tim Johnson
Guest
Posts: n/a

 
      09-20-2003, 11:13 PM
What about just changing their shell access to /bin/false.

That should allow FTP but deny shell access.

-tim


 
Reply With Quote
 
Mike Nugent
Guest
Posts: n/a

 
      09-21-2003, 08:32 AM
Rich Piotrowski wrote:
> On Fri, 19 Sep 2003 17:55:07 +0200, Robert <(E-Mail Removed)> wrote:
>
>
>>Hi,
>>
>>How can i configure my server so that a specific user can't
>>login on my ssh, but can login to my ftp server? I've tried
>>to set shell on /sbin/nologin for that user, but ftp stopped
>>working then too. I am using redhat 9 with OpenSSH and vsftpd.
>>
>>Thank you in advance,
>>
>>Robert Mens

>
>
>
> hosts.allow
> hosts.deny
>
>
> Rich Piotrowski
>
> To E-mail use: rpiotro(at)wi(dot)rr(dot)com


Doesn't hosts.allow and hosts.deny only work if the service is set up
via inetd? sshd usually runs as a standalone daemon.

It's been quite a while since I've used either of these, but I'm pretty
sure that's still true.


--
Mike Nugent
Programmer/Author/DBA/Admin
In search of employment, email for credentials
(E-Mail Removed)

 
Reply With Quote
 
Mike Nugent
Guest
Posts: n/a

 
      09-21-2003, 08:35 AM
Tim Johnson wrote:
> What about just changing their shell access to /bin/false.
>
> That should allow FTP but deny shell access.
>
> -tim
>
>


I'm pretty sure if you specify

ssh (E-Mail Removed) 'ls > /tmp/test'

it will run no matter what shell you have.

I'm pretty sure sshd only spawns a shell from /etc/passwd when you use
it to log into a machine.

What I think this user wants is ftp virtual users. I'm pretty sure
proftpd supports this. Please check the man pages as I haven't set it
up in a very long time.

--
Mike Nugent
Programmer/Author/DBA/Admin
In search of employment, email for credentials
(E-Mail Removed)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deny LDAP user... Cyphos Linux Networking 1 10-16-2006 02:03 PM
Deny DHCP access Scott Windows Networking 1 02-14-2006 05:56 PM
Deny access to folder saint_george Windows Networking 0 01-27-2006 01:39 PM
hosts.deny problem scrunchy2k@yahoo.com Linux Networking 4 07-16-2005 08:23 PM
Allow read Deny Copy shajahan Windows Networking 2 05-07-2005 08:19 PM



1 2 3 4 5 6 7 8 9 10 11