Secure FTP in HP Ux : How to Setup ??

1. Download and install the latest OpenSSH software from

2.Create a user called "user1" and setup password for that user

3. Make sure that user is able to login to the system using his password

4. Make the user to sftponly user by running the following command. Follow the instructions.

    # /opt/ssh/utils/

5. The above command will create the necessary ftp directory structure. If /ftproot was selected as the root directory for the user, then all the /usr, /etc, /dev, /bin directory structure and the required commands like ls, cd, mv, etc.. are copied to the directory structure created.

6. Copy /opt/ssh/utils/sftponly to /bin and /ftproot/bin directory

    # cp /opt/ssh/utils/sftponly
    # cp /opt/ssh/utils/sftponly /ftproot/bin/sftponly

7. Add /bin/sftponly entry to /etc/shells file

    # echo "/bin/sftponly" >> /etc/shells

8. Modify the user1's home directory and shell in /etc/password as follows.

    user1:x:1000:1000:chrooted user:/ftproot/./home/user1:/bin/sftponly 

9. Make sure the user1 home directory is created if not already created

    # mkdir -p /ftproot/home/user1
    # chown user1 ftproot/home/user1

10. Now, the user is jailed within /ftproot directory. Also, user1 can not login to the system using ssh since his shell is set as /bin/sftponly.

Post a Comment


  1. Report Bugs Topic tells about the bug reports of this blogs....

    123 HP Setup Envy 4520


  2. Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.