niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » BSD » OpenBSD
Allow user to SCP but not to SSH
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
Syn
*nix forums addict


Joined: 16 Mar 2005
Posts: 55

PostPosted: Fri Jul 14, 2006 9:25 am    Post subject: Allow user to SCP but not to SSH Reply with quote

Hello,

I would like to create a user account where the user can transfer files
using scp but he shouldn't be allowed to login using SSH or running any
other commands. I've found this in the SnailBook FAQ:

http://www.snailbook.com/faq/restricted-scp.auto.html

But unfortunately there is no examples and how to acheive this. It only
mentions: "The simplest way to do this is to make the target account
special-purpose, by giving it a shell which only allows runing the
file-transfer server."

Does anyone know how I can acheive this ?

Many thanks
Regards
Back to top
Newbie
*nix forums beginner


Joined: 09 Jan 2006
Posts: 5

PostPosted: Fri Jul 14, 2006 9:33 am    Post subject: Re: Allow user to SCP but not to SSH Reply with quote

syn_NOSPAM_uw wrote:
Quote:
Hello,

I would like to create a user account where the user can transfer files
using scp but he shouldn't be allowed to login using SSH or running any
other commands.

http://www.sublimation.org/scponly/

--
Hi, I'm a .signature virus! Copy me to your .signature file and
help me propagate, thanks!
Back to top
the other guy
*nix forums beginner


Joined: 13 May 2005
Posts: 23

PostPosted: Fri Jul 14, 2006 10:01 am    Post subject: Re: Allow user to SCP but not to SSH Reply with quote

syn_NOSPAM_uw <syn_NOSPAM_uw@hotmail.com> wrote:
Quote:
Hello,

I would like to create a user account where the user can transfer files
using scp but he shouldn't be allowed to login using SSH or running any
other commands. I've found this in the SnailBook FAQ:

http://www.snailbook.com/faq/restricted-scp.auto.html

But unfortunately there is no examples and how to acheive this. It only
mentions: "The simplest way to do this is to make the target account
special-purpose, by giving it a shell which only allows runing the
file-transfer server."

Does anyone know how I can acheive this ?


put this in their authorized_keys file before the actual key:
no-pty,

This will grant the user no interactive shell. It won't prevent him to do f.i.

ssh host ls -l

To prevent the file from overwriting you can flag it system immutable (schg)
with chflags.

Peter

--
http://www.boosten.org

Mail: peter at boosten dot org
Back to top
Syn
*nix forums addict


Joined: 16 Mar 2005
Posts: 55

PostPosted: Fri Jul 14, 2006 11:10 am    Post subject: Re: Allow user to SCP but not to SSH Reply with quote

Newbie wrote:

Quote:
http://www.sublimation.org/scponly/


Wow this is a great tool, many thanks!

Do you maybe know how I can with scponly log the transfered files ?
Currently I only see a login attemp being logged nothing else.

Regards
Back to top
Tim Judd
*nix forums beginner


Joined: 06 Jun 2006
Posts: 19

PostPosted: Tue Jul 18, 2006 3:05 am    Post subject: Re: Allow user to SCP but not to SSH Reply with quote

syn_NOSPAM_uw wrote:
Quote:
Hello,

I would like to create a user account where the user can transfer files
using scp but he shouldn't be allowed to login using SSH or running any
other commands. I've found this in the SnailBook FAQ:

http://www.snailbook.com/faq/restricted-scp.auto.html

But unfortunately there is no examples and how to acheive this. It only
mentions: "The simplest way to do this is to make the target account
special-purpose, by giving it a shell which only allows runing the
file-transfer server."

Does anyone know how I can acheive this ?

Many thanks
Regards

add user,
shell: /sbin/nologin

change password (if needed).

Not tried, but logically would work.
Back to top
Martin Gagnon
*nix forums beginner


Joined: 06 Dec 2005
Posts: 15

PostPosted: Tue Jul 18, 2006 11:47 am    Post subject: Re: Allow user to SCP but not to SSH Reply with quote

On 2006-07-18, Tim Judd <tjudd01@hotmail.com> wrote:
Quote:
syn_NOSPAM_uw wrote:
Hello,

I would like to create a user account where the user can transfer files
using scp but he shouldn't be allowed to login using SSH or running any
other commands. I've found this in the SnailBook FAQ:

http://www.snailbook.com/faq/restricted-scp.auto.html

But unfortunately there is no examples and how to acheive this. It only
mentions: "The simplest way to do this is to make the target account
special-purpose, by giving it a shell which only allows runing the
file-transfer server."

Does anyone know how I can acheive this ?

Many thanks
Regards

add user,
shell: /sbin/nologin

change password (if needed).

Not tried, but logically would work.

I've tried.. it's work..

you may want to disable ftp access for that user if you running a ftp
daemon by adding that user into "/etc/ftpusers".

--
Martin
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
The time now is Mon Dec 01, 2008 11:01 pm | All times are GMT
navigation Forum index » *nix » BSD » OpenBSD
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts postfix smtp authentication using mysql stored user/pass rtresidd Postfix 0 Fri Oct 03, 2008 5:58 am
No new posts User Environment - export PATH variable paalepu AIX 0 Tue Sep 12, 2006 8:12 pm
No new posts Capturing user login Information of windows sachin PHP 3 Fri Jul 21, 2006 5:44 am
No new posts Recommend an email program for the debian-user-digest? DJ Hackenbruch Debian 5 Fri Jul 21, 2006 3:20 am
No new posts equivalent of MAIL>SET FORWARD/USER=ME YOU on unix VAXman-@SendSpamHere.ORG VMS 4 Thu Jul 20, 2006 7:56 pm

Car salvage | Debt Help | Free Ajax Scripts | Loan | Mobile Phones
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1411s ][ Queries: 16 (0.0494s) ][ GZIP on - Debug on ]