- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Disable ssh but enable sftp for certain users?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 08:12 AM
04-10-2006 08:12 AM
Disable ssh but enable sftp for certain users?
I know with the security product I'm using allows that granularity - but what about vanilla openssh and/or HP Secure Shell?
The only option I see is to chroot the users...which isn't a bad idea at all...
http://www.brandonhutchinson.com/chroot_ssh.html
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 08:30 AM
04-10-2006 08:30 AM
Re: Disable ssh but enable sftp for certain users?
Let me propose a very simple way.
user and group permissions.
Create a group called sftpusers
Add the chosen users to the group who will be permitted sftp
Change ownership of sftp to the group, or make only sftpusers and root capable of executing the file.
Sounds to me like chroot is more fun, but group permissions would also work if chroot is not an option.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 08:44 AM
04-10-2006 08:44 AM
Re: Disable ssh but enable sftp for certain users?
I don't know if this is what you are looking for, but U can add restrictions to the authorized_keys file.
from="server.domain.id",no-pty,command="scp -f /home/cfg2html/*cfg.html" ssh-dss AAAAB3Nz...user@server
This would not allow other things than to cofy one specific file to a specific server. Even if you try something else it will rewrite the command and only copy that file.
Regards,
Jannik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 09:43 AM
04-10-2006 09:43 AM
Re: Disable ssh but enable sftp for certain users?
Create a script called /usr/local/sbin/ssh-dummy-shell, it should look like this:
if [ "$SSH_ORIGINAL_COMMAND" = "/usr/libexec/openssh/sftp-server" ]
then
/usr/libexec/openssh/sftp-server
else
echo "Restricted"
fi
Edit the user's authorized_keys file and add the following before the key:
command="/usr/local/sbin/ssh-dummy-shell"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 10:00 AM
04-10-2006 10:00 AM
Re: Disable ssh but enable sftp for certain users?
chroot is ssh-dummy-shell as user's shell..
and configure
ChRootUsers fgmacuwc,fgmacr3,fgmacre
Line in sshd2_config in /etc/ssh2..
Hope this helps
Tx
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 10:00 AM
04-10-2006 10:00 AM
Re: Disable ssh but enable sftp for certain users?
chroot is ssh-dummy-shell as user's shell..
and configure
ChRootUsers fgmacuwc,fgmacr3,fgmacre
Line in sshd2_config in /etc/ssh2..
But again user will be able to put any file under his home.. :-)
Hope this helps
Tx
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 10:04 AM
04-10-2006 10:04 AM
Re: Disable ssh but enable sftp for certain users?
Tx
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 10:36 AM
04-10-2006 10:36 AM
Re: Disable ssh but enable sftp for certain users?
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2006 05:56 AM
04-11-2006 05:56 AM
Re: Disable ssh but enable sftp for certain users?
Even with changing a user's default shell to sftp - they can still navigate anywhere on the server...
Thanks for all the answers...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2006 04:14 AM
06-06-2006 04:14 AM
Re: Disable ssh but enable sftp for certain users?
You might take a look at scponly. It secures transfers to a chrooted jail without having to give a full-blown SSH login. We've been using it for a few years now.
http://www.sublimation.org/scponly/
8-)
- Patrick