MOI-14:08-root-10.10.10.100-/tmp# ssh test@x.x.x.x
test@x.x.x.x's password:Could not chdir to home directory /var/www/test/: No such file or directory/bin/bash: No such file or directoryConnection to x.x.x.x closed.vim /etc/ssh/sshd_configMatch User test PasswordAuthentication yes ChrootDirectory /var/www #ForceCommand internal-sftp ForceCommand internal-ssh X11Forwarding no AllowTCPForwarding noMOI-14:08-root-10.10.10.100-/tmp# ssh test@x.x.x.xtest@x.x.x.x's password:
Could not chdir to home directory /var/www/test/: No such file or directory
/bin/bash: No such file or directory
Connection to x.x.x.x closed.
J'ai testé la désactivation internal-ssh. Possible que la balise n'existe pas en modifiant le path du bash
vim /etc/ssh/sshd_config
Match User test
PasswordAuthentication yes
ChrootDirectory /var/www
#ForceCommand internal-sftp
ForceCommand internal-ssh
X11Forwarding no
AllowTCPForwarding no
OU
Match User test
PasswordAuthentication yes
ChrootDirectory /var/www
#ForceCommand internal-sftp#ForceCommand internal-ssh
X11Forwarding no
AllowTCPForwarding no
vim /etc/passwd
test:x:1006:1006::/var/www/test/:/bin/bash
mkdir /var/www/test/bin
cp /bin/bash /var/www/test/bin/
MOI-14:09-root-10.10.10.100-/tmp# ssh test@x.x.x.x
test@x.x.x.x's password:
Could not chdir to home directory /var/www/test/: No such file or directory
/var/www/test/bin/bash: No such file or directory
Connection to x.x.x.x closed.
[^] # Re: root:root
Posté par hakhak91 . En réponse au message Cloisonner utilisateur ssh debian 8 (Résolu). Évalué à 1.
Modification pour la connexion ssh
J'ai testé la désactivation internal-ssh. Possible que la balise n'existe pas en modifiant le path du bash
OU
remplacer par
En root