I m using Past 3 years Google Compute Engine VM instance.Using Putty I generated a private key and public key.Public key added in instance SSH metadata. So using the private key I can ssh using gcloud SDK installed on my local machine.also, I can access GCE VM instance via PHPSTROM & SFTP FileZilla. After RESET VM instance recently I can't connect via SSH. My Local Gcloud SDK Shell Logs:
I ran the below command in Gcloud SDK Shell
I got network : connection timed out issue in PuTTy I could not find solution SSH via Gcloud SDK Shell, Using Public key to connect VM instance via PhpStrom. I don't know What firewall blocking or any other new process I missed. Please help to solve this |
C://ping 10..................5
Pinging 10..................5 with 32 bytes of data:
Reply from 10..................5: bytes=32 time=109ms TTL=58
Reply from 10..................5: bytes=32 time=108ms TTL=58
Reply from 10..................5: bytes=32 time=109ms TTL=58
Reply from 10..................5: bytes=32 time=108ms TTL=58
Ping statistics for 110..................5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 108ms, Maximum = 109ms, Average = 108ms
root@lamp-bafs:/etc/ssh# vi sshd_config
root@lamp-bafs:/etc/ssh# service ssh reload
[ ok ] Reloading OpenBSD Secure Shell server's configuration: sshd.
root@lamp-bafs:~#gcloud compute ssh lamp-bafs --ssh-flag="-p 443"
Did you mean zone [asia-east1-a] for instance: [lamp-bafs] (Y/n)? Y
Linux lamp-bafs 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Aug 21 08:43:37 2017 from ip_address.bc.googleusercontent.com
root@lamp-bafs:~# su - admin
admin@lamp-bafs:~$ gcloud compute ssh lamp-bafs --ssh-flag="-p 443"
Did you mean zone [asia-east1-a] for instance: [lamp-bafs] (Y/n)? Y
Enter passphrase for key '/home/admin/.ssh/google_compute_engine':
Linux lamp-bafs 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Aug 21 06:46:13 2017 from ip_address.bc.googleusercontent.com
C:\Program Files (x86)\Google\Cloud SDK>gcloud compute ssh lamp-bafs --ssh-flag="-p 443"
WARNING: The PuTTY PPK SSH key file for gcloud does not exist.
WARNING: The public SSH key file for gcloud does not exist.
WARNING: The private SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
This tool needs to create the directory [C:\Users\admin\.ssh] before
being able to generate SSH keys.
Do you want to continue (Y/n)? Y
Updating project ssh metadata.../Updated [https://www.googleapis.com/compute/v1/projects/project-id].
Updating project ssh metadata...done.
Waiting for SSH key to propagate.
plink: unknown option "-p"
ERROR: (gcloud.compute.ssh) Could not SSH into the instance. It is possible that your SSH key has not propagated to the instance yet. Try running this command again. If you still cannot connect, verify that the firewall and instance are set to accept ssh traffic.