<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sftp sessions and /usr/bin/false in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974356#M739983</link>
    <description>Allan,&lt;BR /&gt;&lt;BR /&gt;  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.&lt;BR /&gt;&lt;BR /&gt;Sundar.</description>
    <pubDate>Tue, 03 Apr 2007 09:35:41 GMT</pubDate>
    <dc:creator>Sundar_7</dc:creator>
    <dc:date>2007-04-03T09:35:41Z</dc:date>
    <item>
      <title>sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974355#M739982</link>
      <description>I just read a previous message that stated that ftp looks at /etc/shells to see if a valid shell is used for a user. What about sftp? On my system I restrict the user with /usr/bin/false. The /etc/shells has this line in it (permissions are 555). sftp does not work for this user unless I change the shell to /usr/bin/ksh (or sh or csh). Is it possible I have an outdated /usr/bin/false? Mine is size of 12288 dated November of 2000.</description>
      <pubDate>Tue, 03 Apr 2007 08:38:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974355#M739982</guid>
      <dc:creator>Allan Campbell</dc:creator>
      <dc:date>2007-04-03T08:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974356#M739983</link>
      <description>Allan,&lt;BR /&gt;&lt;BR /&gt;  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.&lt;BR /&gt;&lt;BR /&gt;Sundar.</description>
      <pubDate>Tue, 03 Apr 2007 09:35:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974356#M739983</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2007-04-03T09:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974357#M739984</link>
      <description>In spite of the similarity in naming, sftp is totally different from ftp. It needs a shell that can exec sftp-server. That means either a real shell or a special shell specifically for scp/sftp, such as rssh or scponly.</description>
      <pubDate>Tue, 03 Apr 2007 10:34:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974357#M739984</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2007-04-03T10:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974358#M739985</link>
      <description>Did you try the rssh (restricted ssh)&lt;BR /&gt;&lt;BR /&gt;rssh is a restricted shell for use with OpenSSH, allowing only scp and/or sftp.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.pizzashack.org/rssh/" target="_blank"&gt;http://www.pizzashack.org/rssh/&lt;/A&gt;</description>
      <pubDate>Sat, 07 Apr 2007 07:57:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974358#M739985</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2007-04-07T07:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974359#M739986</link>
      <description>I have tried rssh. It doesn't work for me. I get the same results. Then I tried HPs secure shell with no success. At this point I have given up and am using ksh for the user's shell and restricting their ability to not be able to log in directly to my server.</description>
      <pubDate>Sat, 07 Apr 2007 15:57:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974359#M739986</guid>
      <dc:creator>Allan Campbell</dc:creator>
      <dc:date>2007-04-07T15:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974360#M739987</link>
      <description>Here is what we used to implement with sftp&lt;BR /&gt;&lt;BR /&gt;Title: HP-UX: How to configure a user for SFTP access only, in a chroot'ed environment.&lt;BR /&gt;Document ID: 4000115147&lt;BR /&gt;Last Modified Date: 3/2/06&lt;BR /&gt;&lt;BR /&gt;PROBLEM&lt;BR /&gt;Some users on an HP-UX 11.x system with ssh (Secure Shell) should be&lt;BR /&gt;configured to have SFTP access, but these users should not be able to&lt;BR /&gt;log in through ssh.  Instead, these users should be directed to the&lt;BR /&gt;limited environment, often called "chroot'ed" environment.&lt;BR /&gt;&lt;BR /&gt;CONFIGURATION&lt;BR /&gt;Operating System - HP-UX&lt;BR /&gt;Version - 11.x&lt;BR /&gt;Subsystem - ssh&lt;BR /&gt;RESOLUTION&lt;BR /&gt;HOW TO RESTRICT A USER TO ONLY HAVE SFTP ACCESS (NO SSH):&lt;BR /&gt;&lt;BR /&gt;Create the following shell script for the sftp user on the server,&lt;BR /&gt;which you want to deny ssh shell access:&lt;BR /&gt;&lt;BR /&gt;# vi /opt/ssh/etc/sftponly&lt;BR /&gt;#&amp;lt;----------------------  begin script  ----------------------&amp;gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# The shell used here must be /bin/sh&lt;BR /&gt;# Shell arguments must be  -c /opt/ssh/libexec/sftp-server&lt;BR /&gt; if [ "$1" != "-c" -o "$2" != "/opt/ssh/libexec/sftp-server" ]&lt;BR /&gt; then&lt;BR /&gt;   echo "Error: sftpshell only runs the sftp-server program."&lt;BR /&gt;   exit 1&lt;BR /&gt; fi&lt;BR /&gt;&lt;BR /&gt;shift 2&lt;BR /&gt; /opt/ssh/libexec/sftp-server $*&lt;BR /&gt;#&amp;lt;----------------------  end script  ----------------------&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CREATE THE NO-SSH SFTP USER:&lt;BR /&gt;&lt;BR /&gt;1.  Adlib from this example by modifying the /etc/passwd file for the&lt;BR /&gt;    targeted non-ssh sftp user:&lt;BR /&gt;&lt;BR /&gt;    # vi /etc/passwd&lt;BR /&gt;    sftpusr:&lt;ENCRYPTED_PW&gt;:101:20:no-ssh sftp only user:/home/sftpusr:\&lt;BR /&gt;    /opt/ssh/etc/sftponly&lt;BR /&gt;&lt;BR /&gt;2.  Next, modify the ownership and permissions to this new shell account.&lt;BR /&gt;&lt;BR /&gt;    # chmod 555 /opt/ssh/etc/sftponly&lt;BR /&gt;    # chown bin:bin /opt/ssh/etc/sftponly&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CREATE THE NO-SSH SFTP USER USING A CHROOTED DIRECTORY:&lt;BR /&gt;&lt;BR /&gt;If your user is to have a "chrooted" directory follow these steps:&lt;BR /&gt;&lt;BR /&gt;1.  Perform the steps above "CREATE THE NO-SFTP USER".&lt;BR /&gt;&lt;BR /&gt;2.  Create/convert the no-ssh sftp user to have a chrooted directory&lt;BR /&gt;    by using this setup tool:&lt;BR /&gt;&lt;BR /&gt;    # /opt/ssh/ssh_chroot_setup.sh&lt;BR /&gt;&lt;BR /&gt;    Now the password entry would look something like this:&lt;BR /&gt;&lt;BR /&gt;    sftpuser:&lt;ENCRYPTED_PW&gt;:101:20:chrooted no-ssh sftp user:\&lt;BR /&gt;    /newroot/./home/sftpuser:/opt/ssh/etc/sftponly&lt;BR /&gt;&lt;BR /&gt;3.  Complete these no-ssh chrooted configuration steps:&lt;BR /&gt;&lt;BR /&gt;    # mkdir /newroot/opt/ssh/etc&lt;BR /&gt;    # chmod 555 /newroot/opt/ssh/etc&lt;BR /&gt;    # chown bin:bin /newroot/opt/ssh/etc&lt;BR /&gt;    # cp /opt/ssh/etc/sftponly /newroot/opt/ssh/etc&lt;BR /&gt;    # chmod 555 /newroot/opt/ssh/etc/sftponly&lt;BR /&gt;    # chown bin:bin /newroot/opt/ssh/etc/sftponly&lt;BR /&gt;&lt;BR /&gt;    Also be sure these permissions are correct:&lt;BR /&gt;&lt;BR /&gt;    # chmod 555 /newroot/*&lt;BR /&gt;    # chown bin:bin /newroot/*&lt;BR /&gt;    # ls -al /newroot&lt;BR /&gt;    drwxr-xr-x  10 root       sys           8192 Feb 24 09:22 .&lt;BR /&gt;    drwxr-xr-x  32 root       root          8192 Feb 24 11:55 ..&lt;BR /&gt;    dr-xr-xr-x   2 root       sys             96 Aug 19  2005 bin&lt;BR /&gt;    dr-xr-xr-x   2 root       sys             96 Aug 19  2005 dev&lt;BR /&gt;    dr-xr-xr-x   2 root       sys             96 Aug 19  2005 etc&lt;BR /&gt;    dr-xr-xr-x   3 root       sys             96 Aug 19  2005 home&lt;BR /&gt;    dr-xr-xr-x   3 root       sys             96 Aug 19  2005 opt&lt;BR /&gt;    dr-xr-xr-x   2 root       sys             96 Aug 19  2005 sbin&lt;BR /&gt;    dr-xr-xr-x   4 root       sys             96 Aug 19  2005 usr&lt;BR /&gt;    dr-xr-xr-x   3 root       sys             96 Aug 19  2005 var&lt;BR /&gt;&lt;BR /&gt;4.  Lastly, test for no shell to ssh and shell-ok for sftp for the&lt;BR /&gt;    sftpusr from the client:&lt;BR /&gt;&lt;BR /&gt;    $ ssh sftpusr@localhost&lt;BR /&gt;      Password:&lt;BR /&gt;      Error: sftpshell only runs the sftp-server program.&lt;BR /&gt;      Connection to localhost closed.&lt;BR /&gt;&lt;BR /&gt;    $ sftp sftpusr@localhost&lt;BR /&gt;      Connecting to localhost...&lt;BR /&gt;      Password:&lt;BR /&gt;      sftp&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Reference:&lt;BR /&gt;&lt;BR /&gt;     Doc_id:  4000096265&lt;BR /&gt;      Title:  HP-UX: How to configure a user for SFTP access only&lt;BR /&gt;&lt;BR /&gt;ALT KEYWORDS&lt;BR /&gt;"chroot environment"&lt;BR /&gt;"chroot'ed environment"&lt;BR /&gt;"hpux secure shell"&lt;BR /&gt;"hp-ux secure shell"&lt;BR /&gt;"secure shell"&lt;BR /&gt;chroot&lt;BR /&gt;sftp&lt;BR /&gt;sftponly&lt;BR /&gt;ssh&lt;BR /&gt;sshd&lt;/ENCRYPTED_PW&gt;&lt;/ENCRYPTED_PW&gt;</description>
      <pubDate>Thu, 12 Apr 2007 08:36:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974360#M739987</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2007-04-12T08:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974361#M739988</link>
      <description>Getting close, the sftponly script really helped. Howevever, if I want the "chrooted" solution, what you have here is a little lacking. I don't have the ssh_chroot_setup.sh script (which I am assuming is your home grown script?). And creating of the /newroot/... directories - I know that there should be something in them unless the setup script does that. I could not get the chrooted solution to work at all.&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Apr 2007 09:27:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974361#M739988</guid>
      <dc:creator>Allan Campbell</dc:creator>
      <dc:date>2007-04-16T09:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974362#M739989</link>
      <description>I think the chroot setup script is part of HP's ssh package, and chroot functionality is a patch they include in their build. It copies the necessary files in to the chroot directory.&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Apr 2007 13:59:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974362#M739989</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2007-04-16T13:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974363#M739990</link>
      <description>I believe the chroot problem has something to do with this being a trusted system. I found the file, still no help. We are also using openssh - not HP's version of SSH. Our current solution is to try using "HP's version which is currently based on 4.4p1 of BSD's open source software". I should be good to go now.</description>
      <pubDate>Tue, 17 Apr 2007 13:40:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974363#M739990</guid>
      <dc:creator>Allan Campbell</dc:creator>
      <dc:date>2007-04-17T13:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: sftp sessions and /usr/bin/false</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974364#M739991</link>
      <description>Once upon a time I built a working chroot ssh environment on 11.11 with a trusted system, so it should work. But yes, you have to use HP's SSH package, when I last looked generic OpenSSH did not support chroot users (unless you patch it yourself, of course).&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Apr 2007 15:18:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-sessions-and-usr-bin-false/m-p/3974364#M739991</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2007-04-17T15:18:54Z</dc:date>
    </item>
  </channel>
</rss>

