LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2007, 12:45 PM   #1
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Rep: Reputation: 30
sftp with no login


Lets say I have a server with a few virtual domains on one box. I would like to setup sftp so when someone logs in with a particular account they are chrooted within their virtual domain (ie /var/www/domain.com ).

Appears easy enough but I dont want them to be able to log in via ssh. Is this a oxymoron (log in with sftp but not ssh)?

Also, if possible I would like to limit as many of the default files (.font, .local, .kde etc) copied over just to keep things clean in the event there are multiple users for this one domain?
 
Old 01-04-2007, 01:42 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
if a given user is *never* going to login to a normal terminal session, then just set their shell to /sbin/nologin or such like.

for what you're using this for though, i'd wonder if you're best served with sftp as opposed to a convention ftp server like vsftpd...
 
Old 01-04-2007, 07:33 PM   #3
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Try a shell such as scponly or rssh.
 
Old 01-04-2007, 10:27 PM   #4
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Quote:
Originally Posted by acid_kewpie
if a given user is *never* going to login to a normal terminal session, then just set their shell to /sbin/nologin or such like.

for what you're using this for though, i'd wonder if you're best served with sftp as opposed to a convention ftp server like vsftpd...
I set the shell for a user to be /sbin/nologin, but now they are unable to use SFTP (in Windows). It just kicks them out immediately.
 
  


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 login works but sftp doesn't... koyi Linux - Networking 8 02-28-2011 09:34 AM
Anybody know anything about sftp??? markw8500 Linux - Software 6 05-19-2006 09:44 PM
How do I use sftp to upload my web site? (no sftp tar command) johnMG Linux - Networking 6 06-21-2005 10:14 PM
Restricting SFTP, SSH Remote Login majicrobot Linux - Security 1 09-20-2004 11:54 AM
Files truncated by sftp/sftp-server at 65kb gato Linux - Networking 1 12-18-2003 11:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:55 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration