Portál AbcLinuxu, 5. května 2025 21:46
Subsystem sftp internal-sftp Match group sftpusers ChrootDirectory /sftp/%u ForceCommand internal-sftp X11Forwarding no AllowTcpForwarding nokonec citace. Jenže problém je při restartu ssh, dostanu chybu /etc/ssh/sshd_config line 99: Subsystem 'sftp' already defined. V souboru je original tohle
Subsystem sftp /usr/lib/openssh/sftp-server # 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 yesJak mám tedy upravit ten soubor? Díky za pomoc
Odporúčam dôkladnú kontrolu konfiguračného súboru na prípadnu duplicitu.
Iná možnosť je použiť grep. Napríklad grep -E "Subsystem" /etc/ssh/sshd_config
.
# Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.