Hi,
eigentlich hat mfnalex schon fast alles gesagt.
Solange die Zeile Subsystem sftp /usr/lib/openssh/sftp-server in der /etc/ssh/sshd_config existiert, kannst du dich mit jedem User, der sich per SSH anmelden darf, auch per SFTP anmelden.
Ergänzend zum Absichern: Ich mache mir aktuell die Arbeit, für Anfänger bzw. Leute mit wenig Erfahrung ein Script zur Absicherung bzw. zum Prüfen der Absicherung eines Debian Systems geschrieben. Vielleicht willst du es ja nutzen und mir evtl. auch Feedback dazu geben. Link zum Script
(Bitte ignoriere den Port-Scan/Check - der funktioniert aktuell nicht und ich suche da auch noch nach einer Lösung)
Alles anzeigen
Check: Whats the release version of the OS?
Result: [x] You are running an old OS release ()! Please consider an upgrade to the stable release!
Check: Is the system up to date? (apt)
Result: [x] There are 7 updates to do, so please run: apt update && apt upgrade
Check: Does the OS require a reboot?
Result: [✓] This system does not require a reboot!
#### SSH server ####
Check: Is the login as root via SSH disabled?
Result: [✓] Login as root via SSH is disabled!
Check: Is the SSH server using the standard port?
Result: [✓] The SSH port was set to an non-standard port!
Check: Does the SSH server allow logins without a password?
Result: [✓] The login via SSH without a password is disabled!
Check: Is it possible to use password authentication for SSH login?
Result: [x] Please generate a KeyPair on your local client and copy the PublicKey to ~/.ssh/authorized_keys of your remote user. After this, add the line 'AuthenticationMethods publickey' and change PasswordAuthentication in /etc/ssh/sshd_config to no!
Check: Is the SSH login restricted to specific users?
Result: [x] The SSH login is not restricted to your personal user(s). Please add the line 'AllowUsers <username(s)>' to /etc/ssh/sshd_config! (If there is more than one user, use a whitespace-separated list)
Check: Is the SSH server only using pre-defined KexAlgorithms, Ciphers, MACs and HostKeyAlgorithms?
Result: [x] You should specify, which KexAlgorithms, Ciphers, MACs and HostKeyAlgorithms the SSH server is able to use. Take a look at https://infosec-handbook.eu/blog/wss1-basic-hardening/#s3 for an up to date config!
Check: Is the loglevel set to verbose?
Result: [x] The loglevel of the SSH server is to low, please change LogLevel in /etc/ssh/sshd_config to VERBOSE!
Check: Is fail2ban installed and used?
Result: [✓] fail2ban is installed and enabled+running!
#### Additional checks & hints ####
Check: Which filesystem is used by /var/log/?
Result: [!] The directory /var/log/ should not be on the same filesystem as the OS!
Check: Which filesystem is used by /home/?
Result: [!] The directory /home/ should not be on the same filesystem as the OS!
Check: Is the configuration of the network interfaces static?
Result: [!] Your network configuration in /etc/network/interfaces or /etc/network/interfaces.d/* seems to be configured for using DHCP/SLAAC. This could cause problems in network communication, so think about a static configuration.
Check: The script is now scanning for the most popular ports and whether they listen at the network...
Info: --> , 21/tcp, 25/tcp, 80/tcp, 110/tcp, 143/tcp, 443/tcp, 465/tcp, 587/tcp, 993/tcp, 995/tcp
Info: If you see some ports here, which should not listen to the network, please fix your firewall!
Regular Script end
Hier einmal die Ergebnisse. Wie gesagt, bin noch nicht so bewandert was Linux angeht und mache eigentlich alles an Hand von Tutorials und Anleitungen im Netz.
Gar nicht, dazu musst du Root-Login erlauben.
Debian 8 ist uralt und du wirst ab Ende Juni keine Updates mehr erhalten. Was läift denn auf dem Server? Ich würde einen Snapshot anlegen und per apt-get dist-upgrade upgraden oder direkt Debian 10 minimal neu installieren.
Auf dem Server laufen ein Teamspeak3 Server, eine Wordpress Seite auf einem Apache Webserver mit php, ein vmail Server, eine MySQL Datenbank und ein Minecraft Server den ich ab und zu mal anschmeiße.
Müsste ich bei einem Update auf Debian 10 dann alles neu installieren?