1 Answers
Hi Piyush,
The format of gcloud compute ssh command is expected to be –
gcloud compute ssh [USER@]INSTANCE
USER specifies the username with which to SSH. If omitted, the user login name is used. If using OS Login, USER will be replaced by the OS Login user.
INSTANCE specifies the name of the virtual machine instance to SSH into.
Reference – https://cloud.google.com/sdk/gcloud/reference/compute/ssh
> Help from the ERROR message
You’re getting the error because you’re specifying an IP address instead of Instance name.
The error is also hinting that the field value for instance should match the regex ‘a-z?|[1-9][0-9]{0,19}’ which essentially does not allow any DOTS(.) in the name and hence IP addresses can’t be used.
Hope this was helpful!