Les meilleurs administrateurs système freelances sont sur Codeur.com

Récupération accès SSH kimsuffi

 Fermé · Moins de 500 € · 7 offres · 1880 vues · 1 interaction


Connexion SSH impossible après mise à jour Debian Stretch vers Bullseye - Port 22 indisponible

Bonjour,

Suite à une mise à jour Debian de Stretch vers Bullseye, tout semble se passer correctement lors de l'update.

Puis à la connexion SSH suivante, c'est un refus. 

nmap -T5 -Pn 192.xxx
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
443/tcp open https
587/tcp open submission
993/tcp open imaps

Cela me confirme que le port SSH n'est pas disponible.

Je me connecte sur Kimsufi pour redémarrer en mode rescue.

Je créer un point de montage et je monte la partition principale puis j'y entre : 

mkdir /mnt/main && mount /dev/sda2 /mnt/main && chroot /mnt/main

Je vérifie que SSH est installé : dpkg -l | grep openssh-server

Il semble être installé, mais dans le doute, je réinstalle openssh-server :

sudo apt install openssh-server

Je vérifie le fichier de configuration :

nano /etc/ssh/sshd_config : 

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

Include /etc/ssh/sshd_config.d/*.conf

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile     .ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
KbdInteractiveAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the KbdInteractiveAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via KbdInteractiveAuthentication may bypass
# the setting of "PermitRootLogin prohibit-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and KbdInteractiveAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem       sftp    /usr/lib/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server
ClientAliveInterval 120

Et Include /etc/ssh/sshd_config.d/*.conf : 

PasswordAuthentication yes

Puis je redémarre le serveur en mode normal. Mais à nouveau impossible de me connecter en SSH. Comme ci tout ce qui avait été fait en amont n'était pas pris en compte.
Je précise que le serveur réponds bien au ping. 
Il y a aussi un serveur apache dessus qui lui fonctionne bien et réponds. 

Y a t-il quelque chose que je ratte ? Une particularité pour le SSH sur les serveur Kimsufi ?

Infos du serveur : Serveur KS-10 - Intel i5-2300 - 16GB DDR3 1333 MHz - 2To SATA 

Je recherche un sysadmin pour me venir en aide.

Budget indicatif : Moins de 500 €

Publication : 31 décembre 2024 à 17h22

Profils recherchés : Sysadmin freelance , Intégrateur de script freelance , Développeur linux freelance , Spécialiste migration de site freelance

Le profil du client est reservé aux prestataires abonnés

Créer un compte

7 freelances ont répondu à ce projet

7 propositions de devis en moins de 2h

MVaertan Développeur full-stack
ITsense Spécialiste infogérance
aleph-informatique Spécialiste cloud computing
Jaroslaw Chmielewski Développeur WordPress
tobywip Agence de développement PHP
Salem Rabhi Développeur full-stack
i_co Agence développement spécifique

Montant moyen des devis proposés : 100 €

Estimation du délai : 1 jour

Publier un projet similaire

Chaque jour, des centaines de clients utilisent Codeur.com pour trouver un prestataire. Créez votre compte dès maintenant, remplissez votre profil et trouvez de nouveaux clients.

Trouver des nouveaux clients