I have a GCP VM on which is installed a Docker with Drupal.
e2-medium with SSD 10Go
After increasing the disk size to 20GB, I can no longer access the VM in SSH.
My VM was failing to boot because of a boot integrity check. so I use this to solve un integrity problem https://cloud.google.com/compute/shielded-vm/docs/integrity-monitoring#diagnosing-failure
but SSH do not work.
I got connexion refused issue
ssh: connect to host [HOST_IP] port [HOST_PORT]: Connection refused
I also trie to generate a couple of ssh key using (ssh-keygen) and add the pub key on server without result.
Here is the ssh_config:
Include /etc/ssh/ssh_config.d/*.conf
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# IdentityFile ~/.ssh/id_ecdsa
# IdentityFile ~/.ssh/id_ed25519
# Port 22
# Protocol 2
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
#
# Keep alive ssh connections by sending a packet every 2 minutes.
ServerAliveInterval 120
Here is the sshd_config:
PermitRootLogin no
PasswordAuthentication no
ChallengeResponseAuthentication no
PermitRootLogin no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
ClientAliveInterval 120
I have access to the serial console on the VM, but I don't know where to look anymore.
Can you help me please ? Is there an error in my configuration?
Please the result of lsof -i :22
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 1265 root 3u IPv4 21008 0t0 TCP *:ssh (LISTEN)
sshd 1265 root 4u IPv6 21019 0t0 TCP *:ssh (LISTEN)