Unable to connect to SSH neither throught cloud shell or SCP

Before this error happens:

1. I have a VM, I tried to change the permission of all folders to 777, in order to get past an error from data transfer to Cloud Run.

2. leads to "sudo: /etc/sudo.conf is world writable sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set" when I use SSH 

3. I fixed it by m

tonyleung_1-1676229470741.png

 

ounting this infected disk to a temp Instance , changed it back with "chmod 755 /etc/sudo.conf
chmod 4755 /usr/bin/sudo"

Now, 

I have 2 problems.

1. I still not able to connect to SSH.

tonyleung_0-1676229394797.png

I tried trouble shooting and all ticks are green.

Nor FTP (I use Puttygen to create private key then update VM's meta)

2. the 20 GB disk became 65 GB. Is this what caused the problem? anyway to revert back to 20GB without damaging the disk

tonyleung_2-1676229488226.png

Right now, I can still access the site, it runs fine. https://www.nasavape.com 

 

1 REPLY 1

Hi,

It looks more like issue with this VM (mostly with ssh key), not cloud shell ( at least those screenshots and commends performed on VM looks like you did it at cloudshell VM). What you can do atm, is :
1. create VM at the same region and zone,
2. attach bootdisk from broken VM (as normal disk),
3. mount it to /old_vm_data/ i.e ,
4. add your ssh key to .ssh at mounted disk
5. Unmount broken disk
6. Attach to broken one
7. Start VM and check ssh connection
Remember, that "broken_VM" must be powered off to be able to deattach disk.

best,
DamianS