1834008 Members
1802 Online
110063 Solutions
New Discussion

Re: ftp and sftp

 
itai weisman
Super Advisor

ftp and sftp

Hi ppl,
I'm converting some of my accounts to work with sftp instead of ftp.
these users had /bin/false as shell in order to avoid interactive shell, and their home directory is set with /./ in order to prevent from them to navigate on host directories hierarchy.
when attempting to connect the server with sftp, connection won't be established, unless I'm cancelling these restrictions. I don't want these users to have shell access or to be able to explore the host hierarchy.
any ideas?
2 REPLIES 2
Haralambos
Advisor

Re: ftp and sftp

Hi there.

I was reading the other day some of the highlights of the new ssh version released by HP; A.4.3.xxx

In here I think that they mentioned that they have updated their script, the one I believe that creates ssh capable chrooted accounts, to handle ftp(sftp) only accounts as well.

It will certainly worth you checking it out.

regards,

haralambos
Bill Hassell
Honored Contributor

Re: ftp and sftp

ftp will always fail when the shell is not standard. To prevent this failure, put /usr/bin/false in the file /etc/shells (which is what ftp checks to see if there is a valid shell). If /etc/shells does not exist, this is the default list you must put in the file, then add /usr/bin/false.

Here is the default list (from man getusershell)

/sbin/sh
/usr/bini/sh /usr/bin/rsh /usr/bin/ksh /usr/bin/rksh /usr/bin/csh /usr/bin/keysh

Note: On HP-UX (and other SysV versions like Solaris), there is no /bin directory. Type this command:

ll /bin

The symlink is called a transition link and will disappear someday.


Bill Hassell, sysadmin