ho installato la macchina e provato a creare un'utente per lìaccesso in sftp, ma non riesco a farlo funzionare.
queste sono le modifiche fatte a /etc/ssh/sshd_conf
Codice: Seleziona tutto
Subsystem sftp internal-sftp
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM yes
#_______________match con user _____________________
Match User sftp_develope_reporting
ChrootDirectory /var/www/reporting.develope.3dlab
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
#________________match per gruppo___________________
#Match Group sftp_develope_reporting
# ChrootDirectory %h
# AllowTCPForwarding no
# X11Forwarding no
# ForceCommand internal-sftp
Codice: Seleziona tutto
root@capamerica:~$ ls -la /var/www
totale 32
drwxr-xr-x 7 root root 4096 ago 5 10:01 .
drwxr-xr-x 15 root root 4096 ago 5 11:02 ..
-rw-r--r-- 1 root root 177 ago 2 09:52 index.html
drwxr-xr-x 5 www-data root 4096 ago 2 10:35 parser
drwxr-x--- 6 sftp_develope_reporting sftp_develope_reporting 4096 ago 6 09:44 reporting.develope.3dlab
con -vvv dopo la password il debug diceroot@capamerica:~$ sudo sftp sftp_develope_reporting@xxx.xxx.xxx.xxx
sftp_develope_reporting@xxx.xxx.xxx.xxx's password:
Write failed: Broken pipe
Couldn't read packet: Connection reset by peer
debug3: packet_send2: adding 32 (len 78 padlen 18 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to xxx.xxx.xxx.xxx ([xxx.xxx.xxx.xxx]:22).
debug2: fd 4 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
Write failed: Broken pipe
Couldn't read packet: Connection reset by peer
credo possa essere un'errore di permessi, ma dopo 2 giorni di prove alzo la mano e chiedo l'aiuto da casa