I'm having trouble connecting to SSH because my disk is 100% full due to logs (it doesn't connect at all because it's full)

If you ask how the disk is full: cyberpanel is available, modsecurity logs filled 50gb of disk every second. I can no longer connect to browser ssh, sftp. it's only accessible from Google Cloud shell. I rebooted the instance a few times and opened a little space at that time. There is only 1 site available and only 3gb in 10gb limited package. I looked at SFTP, I have 36GB unnecessary log.

I don't know how to connect to SFTP as root. I created a private key for root from putty and defined it in Google Cloud, I tried to enter it, it doesn't allow. My files remained inside.

gcloud shell only provides access to 5gb and 1 hour temporary space, you can enter commands but you can not access files even if root.

I have three chances: doing operations in gcloud shell, connecting to sftp with root and deleting logs (if I can do this, I can set cron and set the auto-deletion of logs), I can enlarge the disk but I couldn't do it on 10gb before. After increasing the disk you need to resize the disk from gcloud shell.

I have also restarted the instance, IP changed and network settings reset the HTTP HTTPS I reopened permission. I can't enter SFTP where I used to be a user.

I'd appreciate any help. T

  • connect via filezilla with sftp://url or you can use putty which also has it. i am unsure but installing the ssh tool on the latest w10 could also have already ssh and maybe sftp option – djdomi Dec 7 '19 at 22:03

i recovered my files by unattaching the disk from original instance than mount to new instance as ADDITIONAL DISK. then mount with ssh command and set directory for additional disk (check did u mount or not)

connect as root to sftp (i use filezilla) then recover your files.

my disk was full because of litespeed logs. i deleted the logs then mounted to original instance. it's working well and normal.

| improve this answer | |
  • This is probably the easiest way. Make sure you set up proper log rotation to avoid having this problem again. – Moshe Katz Dec 9 '19 at 18:49

In addition to your answer to mount the disk in a new instance you can just increase the size of your existing machine following the steps from this guide

Do not forget to resize the partition at the OS level

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.