Unable to access vm instance via ssh anymore - ssh

I'm trying to see if there's anything I can do to re-gain access to my vm instance via SSH. I had access before, I was creating an ssh tunnel to another server and realized I used the wrong one. I killed ssh via 'pkill sshd' and figured I would be able to regain access after a minute however now I'm unable to at all. I just get connection refused, error 255. Is there any way to send a command to the vm instance to have it restart sshd?
Thanks!

Try using the serial console. Alternately, try rebooting the VM, there's a chance SSH will come up without an error if you give it another shot.

Related

My website running in Oracle Cloud is down, how can I repair it?

I have a website that is running in Oracle Cloud, the website now is down and I tried to access using SSH in Putty but it cannot be accessed I only see the terminal screen.
What should I do?
Could you please check if the instance is running or not. If the instance is running please check for the ingress/egress firewall rules at security list/NSG/OS firewall for connectivity to the instance. Make sure you are not connected to any VPN or any corporate network. Once you are able to connect to the instance check for the status of the service. It should be Active.
Could you please confirm, were you able to connect to the instance before? Since when you are facing this issue?
For your reference: connecting to your instance.

Visual Studio Code appears to kill my GCP VMs during Remote SSH

I managed to connect to my GCP (Ubuntu) instance from VS Code via remote-ssh but something it's doing appears to kill my VM instances. I can hit the server with the external IP and apache continues to run, but the virtual hosts are inaccessible.
Don't see anything meaningful in the logs. (It's possible that I'm not looking at the right one.)
Restarting the instance and Apache a few times appears to fix it, inexplicably.
Any ideas? Thanks in advance.

Setting up SSH Server in WSL 2

Trying to setup ssh server on my WSL 2 for local development. I can connect to it from Putty but having trouble connecting from another machine in the same local network. I try to follow scripts from WSL GitHub Issue #4150 but I might not be able to modify the script well enough to make it work for the use case. I'm getting a connection timed out message error.
Thank you in advance.

SSH Google Compute Engine down?

There's an issue with SSH access today ? Don't know why I can't access to my instances today, from a MobaXterm or the SSH webinterface in Google Cloud (impossible to connect port 22).
From Google Cloud Shell => ssh: connect to host XXXX port 22: Connection timed out
Global issue or only my account ?
I would advise you to try the following and check if you are able to connect:
Can you able to ping or SSH into VM instance using gcloud command ?
Could you also try running cloud shell in safe mode.
If you are still running the issue after trying 2 methods, please try to restart the cloud shell (This can be done by selecting restart option from hamburger menu on top right of your Cloud shell) and see if that fixes.
You can interact with the serial console so you can more easily troubleshoot instances that are not booting properly or that are otherwise inaccessible.
Please let me know of the results.

Unable to connect to instance through SSH in google compute engine , another instance of same account works fine

I am trying to connect to my instance using gcloud compute ssh new-instance .. it's gives the following error:
ssh: connect to host 107.167.180.68 port 22: Connection refused
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
See https://cloud.google.com/compute/docs/troubleshooting#ssherrors for troubleshooting hints.
I had already tried all the possible solution mentioned in the google document.
Any suggestions on how to get a backup of the Database and file? The site has been down for the last two days
Thanks in advance
I'd recommend looking at the serial console output of the VM instance using gcloud compute instances get-serial-port-ouput or using "View serial port" button on the instance page in Cloud Console. That output should give you information about what is wrong with the VM, such as whether it runs out of memory or ran out of disk space or something like that. Also, make sure you didn't change the VM's network firewall rules to accidentally disallow incoming traffic on port 22.
The documentation page for SSH from the Browser also has some additional tips on how to explore this kind of issues - see here and here.
You can use the ssh keys with other instances of your account if you update the ssh keys in your metadata by
sudo gcloud compute config-ssh