URL: https://linuxfr.org/forums/linux-debutant/posts/acces-ssh-defaillant-suite-a-migration-debian-9-10-resolu Title: Accès ssh défaillant suite à migration Debian 9> 10 (résolu) Authors: Kreego Date: 2019年11月07日T18:51:59+01:00 License: CC By-SA Tags: ssl, putty, sftp et debian Score: 2 Avé tout le monde. Je vous soumets un problème qui doit sans doute être peu compliqué pour un veritable admin, mais qui me gâche la fête depuis hier. J'ai migré avec succès de Debian 9 à 10. Tout s'est bien passé sauf : **mon accès ssh/sftp ne marche plus, le serveur ssh ne répond pas OU refuse la connexion**, malgré mes précautions (j'avais demandé de garder le fichier de config existant). ssh/sftp marchait bien sous Debian 9. Message PuTTY :> "Network error : connection refused" Message de Core FTP LE : >"Resolving xx.xxx.xxx.xxx... >xx.xxx.xxx.xxx [22] connecting... >SFTP connection error - Connection timed out>Can't establish connection --> xx.xxx.xxx.xxx:22 @ Thu Nov 07 15:24:34 2019 (10038-10060) : Mon serveur chez OVH : ```sh Operating system Debian Linux 10 Webmin version 1.930 Kernel and CPU Linux 3.8.13-xxxx-grs-ipv6-64-vps on x86_64 Processor information AMD Opteron(tm) Processor 6128, 4 cores PHP 7.2.24-1+0~20191026.31+debian8~1.gbpbbacde (cli) (built: Oct 26 2019 16:08:53) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.24-1+0~20191026.31+debian8~1.gbpbbacde, Copyright (c) 1999-2018, by Zend Technologies ``` J'ai donc desinstallé openssh-server et openssh-client ```sh apt-get remove openssh-server openssh-client --purge ``` et nettoyé ```sh apt-get autoremove sudo apt-get autoclean ``` avant de rechercher à nouveau ces deux packages ```sh apt-get update ``` Voici ce qui se passe quand je reinstalle openssh-server et openssh-client ("-y --force-yes -f" permet de passer la confirmation de continuation au script, dans webmin) ```sh apt-get -y --force-yes -f install openssh-server openssh-client Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: libxmuu1 openssh-sftp-server xauth Suggested packages: keychain libpam-ssh monkeysphere ssh-askpass molly-guard rssh ufw The following NEW packages will be installed: libxmuu1 openssh-client openssh-server openssh-sftp-server xauth 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. 4 not fully installed or removed. Need to get 64.1 kB/1243 kB of archives. After this operation, 5375 kB of additional disk space will be used. Get:1 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libxmuu1 amd64 2:1.1.2-2+b3 [23.9 kB] Get:2 http://cdn-fastly.deb.debian.org/debian buster/main amd64 xauth amd64 1:1.0.10-1 [40.3 kB] debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (This frontend requires a controlling tty.) debconf: falling back to frontend: Teletype dpkg-preconfigure: unable to re-open stdin: Fetched 64.1 kB in 0s (341 kB/s) (Reading database ... (Reading database ... 5% [...] (Reading database ... 100% (Reading database ... 76387 files and directories currently installed.) Preparing to unpack .../openssh-client_1%3a7.9p1-10+deb10u1_amd64.deb ... Unpacking openssh-client (1:7.9p1-10+deb10u1) ... Selecting previously unselected package libxmuu1:amd64. Preparing to unpack .../libxmuu1_2%3a1.1.2-2+b3_amd64.deb ... Unpacking libxmuu1:amd64 (2:1.1.2-2+b3) ... Selecting previously unselected package openssh-sftp-server. Preparing to unpack .../openssh-sftp-server_1%3a7.9p1-10+deb10u1_amd64.deb ... Unpacking openssh-sftp-server (1:7.9p1-10+deb10u1) ... Preparing to unpack .../openssh-server_1%3a7.9p1-10+deb10u1_amd64.deb ... Unpacking openssh-server (1:7.9p1-10+deb10u1) ... Selecting previously unselected package xauth. Preparing to unpack .../xauth_1%3a1.0.10-1_amd64.deb ... Unpacking xauth (1:1.0.10-1) ... Setting up openssh-client (1:7.9p1-10+deb10u1) ... Setting up grub-pc (2.02+dfsg1-20) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline Installing for i386-pc platform. Installation finished. No error reported. Generating grub configuration file ... /etc/grub.d/06_OVHkernel: line 6: /usr/lib/grub/update-grub_lib: No such file or directory dpkg: error processing package grub-pc (--configure): installed grub-pc package post-installation script subprocess returned error exit status 1 Setting up keyboard-configuration (1.193~deb10u1) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline cat: '/sys/bus/usb/devices/*:*/bInterfaceClass': No such file or directory cat: '/sys/bus/usb/devices/*:*/bInterfaceSubClass': No such file or directory cat: '/sys/bus/usb/devices/*:*/bInterfaceProtocol': No such file or directory /var/lib/dpkg/info/keyboard-configuration.postinst: 108: /var/lib/dpkg/info/keyboard-configuration.postinst: cannot create /etc/default/keyboard: Permission denied dpkg: error processing package keyboard-configuration (--configure): installed keyboard-configuration package post-installation script subprocess returned error exit status 2 Setting up libxmuu1:amd64 (2:1.1.2-2+b3) ... Setting up openssh-sftp-server (1:7.9p1-10+deb10u1) ... dpkg: dependency problems prevent configuration of console-setup: console-setup depends on keyboard-configuration (= 1.193~deb10u1); however: Package keyboard-configuration is not configured yet. dpkg: error processing package console-setup (--configure): dependency problems - leaving unconfigured Setting up openssh-server (1:7.9p1-10+deb10u1) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline rescue-ssh.target is a disabled or a static unit, not starting it. Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details. invoke-rc.d: initscript ssh, action "restart" failed. ●くろまる ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Thu 2019年11月07日 15:21:08 CET; 9ms ago Docs: man:sshd(8) man:sshd_config(5) Process: 30350 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255/EXCEPTION) dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 1 Setting up xauth (1:1.0.10-1) ... dpkg: dependency problems prevent configuration of console-setup-linux: console-setup-linux depends on keyboard-configuration (= 1.193~deb10u1); however: Package keyboard-configuration is not configured yet. dpkg: error processing package console-setup-linux (--configure): dependency problems - leaving unconfigured Processing triggers for systemd (241-7~deb10u1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10) ... Errors were encountered while processing: grub-pc keyboard-configuration console-setup openssh-server console-setup-linux W: --force-yes is deprecated, use one of the options starting with --allow instead. E: Sub-process /usr/bin/dpkg returned an error code (1) ``` ```sh service ssh restart Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details. ``` ```sh systemctl status ssh.service ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019年11月07日 15:24:53 CET; 18s ago Docs: man:sshd(8) man:sshd_config(5) Process: 31292 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255/EXCEPTION) Nov 07 15:24:53 vps129566 systemd[1]: ssh.service: Service RestartSec=100ms expired, scheduling restart. Nov 07 15:24:53 vps129566 systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5. Nov 07 15:24:53 vps129566 systemd[1]: Stopped OpenBSD Secure Shell server. Nov 07 15:24:53 vps129566 systemd[1]: ssh.service: Start request repeated too quickly. Nov 07 15:24:53 vps129566 systemd[1]: ssh.service: Failed with result 'exit-code'. Nov 07 15:24:53 vps129566 systemd[1]: Failed to start OpenBSD Secure Shell server. ``` Je sais qu'il y a des erreurs pour d'autres modules, mais n'ont toutefois pas causé des problèmes tout au long de la migration Debian 7> 8> 9 : > grub-pc> keyboard-configuration> console-setup> console-setup-linux (mais je peux me tromper !) A rectifier ... une fois que mon accès ssh/sftp remarche ! Merci de vos lumières, et de votre précieuse assistance ! Christian