Operating System - HP-UX
1827808 Members
2323 Online
109969 Solutions
New Discussion

Re: pb with SFTP and restricted shell

 
benseghir_1
Advisor

pb with SFTP and restricted shell

Hi,
I want to create an ftp user, i create user with /usr/bin/false as shell user. when i test the connection using sftp , it didn't work. if i change the shell, /bin/sh ie normale shell , it work.
but i need to have a user who can do ftp only.
please can i have suggestion.

Best regards
7 REPLIES 7
Steven Protter
Frequent Advisor

Re: pb with SFTP and restricted shell

Shalom,

tail -f /var/adm/syslog/syslog.log

Try the ftp transaction with /usr/bin/false as shell.

You will see an error.

Correct or post it and someone will help.

SEP
Ninad_1
Honored Contributor

Re: pb with SFTP and restricted shell

Do you have a /etc/shells file ?
If yes can you put the entry for /usr/bin/false as well and check again.

Regards,
Ninad
Frank de Vries
Respected Contributor

Re: pb with SFTP and restricted shell

It is like it was said:
Use /usr/bin/false in password file
and /etc/shells (create this file)
and ensure your ftp deamon has
the correct option in inetd.conf

especially the -a enables the ftpaccess
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a -t 250

Then you should have the correct settings
there in /etc/ftpd/ftpaccess

Let me know indeed what error , is will give
us a clue to where to shoot.

Keep cooking:)
Look before you leap
benseghir_1
Advisor

Re: pb with SFTP and restricted shell

hi all,

thanks for your help, but i didn't expose the problem vey well.
I want to use sftp of ssh for user. but i didn't want to give this user normale shell, i want to give him restricted shell, for this reason, i give this user /usr/bin/false as user shell in /etc/passwd and i have /usr/bin/false in
/etc/shells.

it sftp of ssh didn't work with /usr/bin/false as shell user.

thanks for your help

benseghir_1
Advisor

Re: pb with SFTP and restricted shell

hi all,

thanks for your help, but i didn't expose the problem vey well.
I want to use sftp of ssh for user. but i didn't want to give this user normale shell, i want to give him restricted shell, for this reason, i give this user /usr/bin/false as user shell in /etc/passwd and i have /usr/bin/false in
/etc/shells.

is sftp of ssh didn't work with /usr/bin/false as shell user.

thanks for your help

benseghir_1
Advisor

Re: pb with SFTP and restricted shell

hi all,

i use putty as windows client, when try to connect to unix server , i had the following error : Cannot initialize SFTP protocol. Is the host running a SFTP server?

Connection has been unexpectedly closed. Server sent command exit status 1.

in the syslog i have just:
May 15 21:27:31 edcte10b sshd[7404]: Accepted keyboard-interactive/pam for userftp from 10.21.3.156 port 3744 ssh2

May 15 21:27:31 edcte10b sshd[7411]: subsystem request for sftp

Darrel Louis
Honored Contributor

Re: pb with SFTP and restricted shell

Hi,

Check the following url:
http://vsftpd.beasts.org/
With vsftp you still have a secure ftp.

GoodLuck
Darrel