j’ai fait comme micp me l’a enseigné dans un autre thread :
daniel@localhost:~$ sftp -v -P 666 jessie@localhost
OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to localhost [::1] port 666.
debug1: Connection established.
debug1: identity file /home/daniel/.ssh/id_rsa type -1
debug1: identity file /home/daniel/.ssh/id_rsa-cert type -1
debug1: identity file /home/daniel/.ssh/id_dsa type -1
debug1: identity file /home/daniel/.ssh/id_dsa-cert type -1
debug1: identity file /home/daniel/.ssh/id_ecdsa type -1
debug1: identity file /home/daniel/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4
debug1: match: OpenSSH_6.0p1 Debian-4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 08:63:7a:13:7d:93:6a:1a:b1:b5:26:8a:d4:2e:b0:9a
debug1: Host ‘[localhost]:666’ is known and matches the ECDSA host key.
debug1: Found key in /home/daniel/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/daniel/.ssh/id_rsa
debug1: Trying private key: /home/daniel/.ssh/id_dsa
debug1: Trying private key: /home/daniel/.ssh/id_ecdsa
debug1: Next authentication method: password
jessie@localhost’s password:
debug1: Authentication succeeded (password).
Authenticated to localhost ([::1]:666).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = fr_CA.UTF-8
debug1: Sending subsystem: sftp
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
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Transferred: sent 1864, received 1600 bytes, in 0.0 seconds
Bytes per second: sent 70056.7, received 60134.5
debug1: Exit status 1
Connection closed
poursuivi avec :
daniel@localhost:~$ cat /etc/rssh.conf
logfacility = LOG_USER
allowsftp
umask = 022
rendu ici, je refait les étapes du tuto sur le wiki (car je me suis rendu compte que le cat ci-dessus ne donnait pas le chrootpath :
chmod u+s /usr/lib/rssh/rssh_chroot_helper
Ajouter ligne chrootpath /home/sftp dans rssh.conf
echo ‘chrootpath = “/home/sftp”’ >> /etc/rssh.conf
daniel@localhost:~$ sftp -P 666 thorhyeux@localhost
thorhyeux@localhost’s password:
Connection closed
daniel@localhost:~$ cat /etc/rssh.conf
logfacility = LOG_USER
allowsftp
umask = 022
chrootpath = “/home/sftp”
ensuite :
daniel@localhost:~$ ls -R /home/sftp
/home/sftp:
dev etc lib lib64 usr
/home/sftp/dev:
log null (rem. : log et null??)
/home/sftp/etc:
passwd
/home/sftp/lib:
x86_64-linux-gnu
/home/sftp/lib/x86_64-linux-gnu:
libbsd.so.0 libc.so.6 libnss_files.so.2 libtinfo.so.5
/home/sftp/lib64:
ld-linux-x86-64.so.2
/home/sftp/usr:
bin lib
/home/sftp/usr/bin:
sftp
/home/sftp/usr/lib:
openssh x86_64-linux-gnu
/home/sftp/usr/lib/openssh:
sftp-server
/home/sftp/usr/lib/x86_64-linux-gnu:
libedit.so.2
et ensuite ceci :
daniel@localhost:~$ ls -1 /home/sftp/dev /usr/lib/rssh/rssh_chroot_helper /home/sftp/etc/passwd
/home/sftp/etc/passwd
/usr/lib/rssh/rssh_chroot_helper
/home/sftp/dev:
log
null
j’ai tenté de tout comprendre mais < partir ls -R /home/sftp et ls -s /home/sftp/dev /usr/lib/rssh/rssh_chroot_helper /home/sftp/etc/passwd, les réponses sont trop différentes (ce que je m’explique mal c’est pourquoi ces données auraient changé alors que je n’ai fais aucunes manipulations dessus) bref, cela fonctionnait vendredi mais aujourd’hui c’est le capharnaum
si quelqun pouvait me débrouillé ça j’apprécierais
merci