Добрый день. Подскажите пожалуйста, никак не разберусь с ssh.
Установил CentOS 6.4, создал папку /var/www для каждого пользователя создается подпапка /var/www/user (принадлежит root, задана как домашняя у пользователя, пользователь в группе sftp) в ней уже пользователь размещает свои файлы. Хочу получить доступ по ssh к конкретной папке пользователя.
в ssh_config прописал (по http://en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP)
Subsystem sftp internal-sftp
Match Group sftp-only
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
но пользователь не может зайти
в консоли на ввод пароля выдает следующее:
debug2: we sent a password packet, wait for reply debug1: Authentication succeeded (password). Authenticated to 192.245.1.251 ([192.245.1.251]:22). debug1: channel 0: new [client-session] debug2: channel 0: send open debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug2: callback start debug2: client_session2_setup: id 0 debug2: fd 3 setting TCP_NODELAY debug2: channel 0: request pty-req confirm 1 debug1: Sending environment. debug1: Sending env LANG = ru_RU.UTF-8 debug2: channel 0: request env confirm 0 debug2: channel 0: request shell confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel_input_status_confirm: type 99 id 0 debug2: PTY allocation request accepted on channel 0 debug2: channel 0: rcvd adjust 2097152 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 Last login: Mon Nov 4 11:47:11 2013 from 192.245.1.154 debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: channel 0: close_write debug2: channel 0: output drain -> closed debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug2: channel 0: rcvd eow debug2: channel 0: close_read debug2: channel 0: input open -> closed debug2: channel 0: rcvd close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 Connection to 192.245.1.251 closed. Transferred: sent 1984, received 2112 bytes, in 0.0 seconds Bytes per second: sent 160075.0, received 170402.4 debug1: Exit status 1