ssh connection refused after editing fstab in Google cloud vm

308 Views Asked by At

I'm getting ssh: connect to host xx.xx.xx.xx port 22: Connection refused after updating fstab for mounting Google bucket. fstab entry that I have added is as follows,

bucket mount_point fuse rw,nosuid,nodev,relatime,user_id=1004,group_id=1005,default_permissions 0 0

ssh connection is came up after updating fstab and restarting the vm. Is there a relationship between fstab entry and ssh connection issue? and how I'm supposed to change fstab entry while I can't connect vm through ssh?

1

There are 1 best solutions below

1
On

Changes to /etc/fstab should not cause a problem with SSH

I would start by checking the firewall rules of your project

gcloud compute firewall-rules list

Add default-allow-ssh rule if it is missing

gcloud compute firewall-rules create default-allow-ssh --allow tcp:22

Did you install a firewall in the OS? If you could share the output of nmap against the external IP of your instance it will be great.