I was able to login via ssh normally but it just stopped working.
I tried to stop and start instance but it doesn't help. Could anybody help?
You could check your Firewall Rules in GCP console and if it is not created you can create the rule and with port number 22
$ gcloud compute firewall-rules create default-allow-ssh --allow tcp:22
After try to connect to SSH...
Related
When trying to connect to my google cloud RDP i receive an error saying that my RDP is offline when it is not. At first I thought the error was on my side, but after trying with another RDP it worked fine, any ideas?
You should first check that port 3389 is open on the GCE firewall. If not, run a command like this to create the rule $ gcloud compute firewall-rules create rdp --allow tcp:3389 --source-ranges 0.0.0.0/0 . More info is available here.
Here is a document to troubleshoot RDP issues, you can try these steps. Also you can connect to the instance using a serial console.
I have migrated an EC2 instance (amazon linux) to Google cloud (ubuntu 18.04) using cloud endure.
But I am not able to ssh into google cloud VM. I dont have EC2 instance anymore. How can I access the Google cloud VM ? Error message:
ERROR: (gcloud.beta.compute.ssh) [/usr/bin/ssh] exited with return code [255]
using gcloud command you can config your SSH
gcloud compute config-ssh
for more details on config-ssh ref :
Link
If the gcloud compute config-ssh doesn't work check the firewall rules for your machine; find the VPC it's in and make sure port 22 is open - it may happen it's blocked.
If you're not sure if SSH can come through create a rule for it.
Very similar issue was also discussed in this topic on StackOverflow which might help you.
You can (to be absolutely sure SSH traffic is allowed to your VM) set up a startup script for it: edit the VM in question and find "Custom Metadata" section and click "Add Item", next type startup-script as a key and the command sudo ufw allow ssh in the "value" field.
Having the SSH traffic enabled in the GCP firewall and the VM itself you should be able to log in.
i´m using ubuntu 18.04 lts in google compute engine and glassfish server running perfectly as seen in the following image:
already configure a static ip to the gcp vm:
and i remove the S so I can access my server
and i also add port 8080 to be able to connect and nothing keeps throwing me error
already try like this :http://34.94.96.242:8080
and this: http://34.94.96.242:4848
And i still don't have access
Did you try reaching your glassfish server inside the Compute Engine?, I mean using for example:
curl localhost:[PORT]
in the terminal and see the output, if OK, your installation is OK and probably there is a firewall rule missing, so you have to create it with the specific port.
For example for enabling traffic in port 22 for using SSH, you need to execute the following command in cloud shell:
gcloud compute firewall-rules create default-allow-ssh --allow tcp:22
or for opening port 8080
gcloud compute firewall-rules create default-allow-glassfish --allow tcp:808
Take a look at this documentation about how to set up firewall rules in GCP step-by-step.
I was using digitalocean and want to try out gcp compute instance. I created an ubuntu instance, did cat ~/.ssh/id_rsa.pub in my terminal and added onto the instance. Then I tried ssh james#external ip in my terminal (I'm using mac) but it just hang there.. then a min later, I got Connection refused error. What's wrong?
There are numerous possible reasons for this, but mostly likely you're missing a firewall rule to allow connections from the outside:
gcloud compute firewall-rules create default-allow-ssh --allow tcp:22
If this doesn't help, check out the Troubleshooting SSH article in the GCP docs.
First check your network can communicate to compute engine via simple ping command.
ping <GCE external IP>
or
telnet <GCE external IP> 22
If you getting request timed out then most probably firewall issue. go to cloud console and create/update firewall rule under VPC section. search tcp:22 in firewalls section and edit/create firewall rule (add your IP ranges into source IP range section) for ssh connection.
refer: https://cloud.google.com/sdk/gcloud/reference/compute/firewall-rules/create
I want to Running a basic Apache web server on google cloud (https://cloud.google.com/compute/docs/tutorials/basic-webserver-apache)
But I can't connect with my External IP .
Last month I succeed launching a server with the External IP, why can't this time?
I have Allow HTTP Traffic box.
How to find the bug?
Restart the VM then check out if the Firewall-rules still activated:
$ gcloud compute firewall-rules list | grep 80
if not is created the firewall-rule, set it up again:
$ gcloud compute firewall-rules create default-http --allow tcp:80
hope it can be useful to you