- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sftp sessions and /usr/bin/false
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
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
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-03-2007 01:38 AM
тАО04-03-2007 01:38 AM
sftp sessions and /usr/bin/false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2007 02:35 AM
тАО04-03-2007 02:35 AM
Re: sftp sessions and /usr/bin/false
I dont think there is such thing as "old" /usr/bin/false. It is just a place holder for the login program (which is typically a shell), so that the user will only have FTP access and not be able to open a terminal session using telnet or other mechanism.
Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2007 03:34 AM
тАО04-03-2007 03:34 AM
Re: sftp sessions and /usr/bin/false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2007 12:57 AM
тАО04-07-2007 12:57 AM
Re: sftp sessions and /usr/bin/false
rssh is a restricted shell for use with OpenSSH, allowing only scp and/or sftp.
http://www.pizzashack.org/rssh/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2007 08:57 AM
тАО04-07-2007 08:57 AM
Re: sftp sessions and /usr/bin/false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 01:36 AM
тАО04-12-2007 01:36 AM
Re: sftp sessions and /usr/bin/false
Title: HP-UX: How to configure a user for SFTP access only, in a chroot'ed environment.
Document ID: 4000115147
Last Modified Date: 3/2/06
PROBLEM
Some users on an HP-UX 11.x system with ssh (Secure Shell) should be
configured to have SFTP access, but these users should not be able to
log in through ssh. Instead, these users should be directed to the
limited environment, often called "chroot'ed" environment.
CONFIGURATION
Operating System - HP-UX
Version - 11.x
Subsystem - ssh
RESOLUTION
HOW TO RESTRICT A USER TO ONLY HAVE SFTP ACCESS (NO SSH):
Create the following shell script for the sftp user on the server,
which you want to deny ssh shell access:
# vi /opt/ssh/etc/sftponly
#<---------------------- begin script ---------------------->
#!/bin/sh
# The shell used here must be /bin/sh
# Shell arguments must be -c /opt/ssh/libexec/sftp-server
if [ "$1" != "-c" -o "$2" != "/opt/ssh/libexec/sftp-server" ]
then
echo "Error: sftpshell only runs the sftp-server program."
exit 1
fi
shift 2
/opt/ssh/libexec/sftp-server $*
#<---------------------- end script ---------------------->
CREATE THE NO-SSH SFTP USER:
1. Adlib from this example by modifying the /etc/passwd file for the
targeted non-ssh sftp user:
# vi /etc/passwd
sftpusr:
/opt/ssh/etc/sftponly
2. Next, modify the ownership and permissions to this new shell account.
# chmod 555 /opt/ssh/etc/sftponly
# chown bin:bin /opt/ssh/etc/sftponly
CREATE THE NO-SSH SFTP USER USING A CHROOTED DIRECTORY:
If your user is to have a "chrooted" directory follow these steps:
1. Perform the steps above "CREATE THE NO-SFTP USER".
2. Create/convert the no-ssh sftp user to have a chrooted directory
by using this setup tool:
# /opt/ssh/ssh_chroot_setup.sh
Now the password entry would look something like this:
sftpuser:
/newroot/./home/sftpuser:/opt/ssh/etc/sftponly
3. Complete these no-ssh chrooted configuration steps:
# mkdir /newroot/opt/ssh/etc
# chmod 555 /newroot/opt/ssh/etc
# chown bin:bin /newroot/opt/ssh/etc
# cp /opt/ssh/etc/sftponly /newroot/opt/ssh/etc
# chmod 555 /newroot/opt/ssh/etc/sftponly
# chown bin:bin /newroot/opt/ssh/etc/sftponly
Also be sure these permissions are correct:
# chmod 555 /newroot/*
# chown bin:bin /newroot/*
# ls -al /newroot
drwxr-xr-x 10 root sys 8192 Feb 24 09:22 .
drwxr-xr-x 32 root root 8192 Feb 24 11:55 ..
dr-xr-xr-x 2 root sys 96 Aug 19 2005 bin
dr-xr-xr-x 2 root sys 96 Aug 19 2005 dev
dr-xr-xr-x 2 root sys 96 Aug 19 2005 etc
dr-xr-xr-x 3 root sys 96 Aug 19 2005 home
dr-xr-xr-x 3 root sys 96 Aug 19 2005 opt
dr-xr-xr-x 2 root sys 96 Aug 19 2005 sbin
dr-xr-xr-x 4 root sys 96 Aug 19 2005 usr
dr-xr-xr-x 3 root sys 96 Aug 19 2005 var
4. Lastly, test for no shell to ssh and shell-ok for sftp for the
sftpusr from the client:
$ ssh sftpusr@localhost
Password:
Error: sftpshell only runs the sftp-server program.
Connection to localhost closed.
$ sftp sftpusr@localhost
Connecting to localhost...
Password:
sftp>
Reference:
Doc_id: 4000096265
Title: HP-UX: How to configure a user for SFTP access only
ALT KEYWORDS
"chroot environment"
"chroot'ed environment"
"hpux secure shell"
"hp-ux secure shell"
"secure shell"
chroot
sftp
sftponly
ssh
sshd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2007 02:27 AM
тАО04-16-2007 02:27 AM
Re: sftp sessions and /usr/bin/false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2007 06:59 AM
тАО04-16-2007 06:59 AM
Re: sftp sessions and /usr/bin/false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 06:40 AM
тАО04-17-2007 06:40 AM
Re: sftp sessions and /usr/bin/false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 08:18 AM
тАО04-17-2007 08:18 AM