Unable to SSH into GCP vm - troubleshoot showing no issue - linux

I am unable to ssh into a gcp vm. When i try troubleshooting- it is not showing any issue.
I was able to ssh into other VMs.
FYI i have a Github instance installed into that vm.
this is the firewall config, i tried allowing both http and https- but it did not work.-
How do i proceed to troubleshoot further?
From GCP doc
After an SSH connection fails, you have the option to Retry the connection, or Troubleshoot the connection using the SSH-in-browser troubleshooting tool.
i did troubleshoot but all steps were green.

As #John Hanley suggested on troubleshooting using the serial console to check and view the error messages for authentication failure.
In addition to that from the Compute Engine VM serial logs you can check also for a UFW block error warning then if you have seen this error message follow this steps for troubleshooting:
Go to VM instances page > Click the name of your VM instance
Click the EDIT button at the top of the page
Scroll down to "Custom metadata" section
For the box Key, please input "startup-script"
On the Value box, input "sudo ufw allow 22"
Save your changes.
Once saved, please click on the RESET button at the top of the page.
Check also whether or not the VM boot disk is full see this documentation on Inaccessible VM due to full boot disk for general Troubleshooting SSH errors see this documentation.

Related

Azure Filesshare - System error 53 - Troubleshooting

I am also having the same problem as mentioned here Azure Files - System error 53
Although I'm afraid the answers provided have not helped.
My current setup all in west europe
File Share
VM 1 Windows 2012 - Can connect to File Share
VM 2 Windows 2012 - Cannot connect to File Share
I've run PortQRY which confirms that port 445 is outgoing and working.
Although I am still receiving this error
This error occurred after a random shutdown, before which I could connect fine.
What other troubleshooting steps can I take to find out why this is not working?
According to your description, it seems that no issue is on your network between VM and Azure FileShare.
You could refer to Mine's link, please check Cause 3.
"System Error 53 or System error 87" can also be received if NTLMv1
communication is enabled on the client. Having NTLMv1 enabled creates
a less-secure client. Therefore, communication will be blocked for
Azure Files. To verify whether this is the cause of the error, verify
that the following registry subkey is set to a value of 3:+
HKLM\SYSTEM\CurrentControlSet\Control\Lsa > LmCompatibilityLevel.
I also met a similar question with you, you could check the link. The solution is to modify the registry

VM Keeps restarting

I have a VM host in Azure, created using Resource Manager. I've come to use it today and can't RDP to the machine. When I view the Boot Diagnostics it has Please Wait. after a period of time it will go to the logon screen. When I view the CPU usage you can see it drop which assume is the VM restarting.
I've tried the following :
Reset Password
Reset Configuration
Redeploy
I've also looked at the network interfaces and tried adding it to a network security group with RDP rule but still nothing.
Is there anything else I can check?
EDIT
When I first start the VM up and look at the Boot diagnostics I can see the login screen. When I try and RDP to the machine it says it can't connect.
The CPU drops where I assume its restarting, I've tried RDP to the machine from another machine on the same VPN
I raised a ticket regarding the following. Support noticed the following in the logs "Rebooting VM to apply DSC configuration." The "DSC extension" was causing the machine to reboot.
They advised me to go to VM in the control panel and then extensions and uninstall the Powershell extension. Not sure what caused this ie I did not knowingly install this. But once I uninstalled it I was able to RDP. Support have asked me to try and install it again and see if the same happens again but at the moment not had a chance to do this.

ssh: connect to host on port 22: Connection refused

I have looked around for answers but didn't not able to find solution related to my query.
I was able to ssh the server earlier but after a reboot I was not able to. I checked Azure portal for the instance it was showing status as Running. I tried rebooting it a couple of times but I was not able to ssh. I checked further and found out that the public IP shown was different this time. I tried with that IP but still not able to login.
Any suggestion what I should I do next. Also, how can I make the IP static in Azure.
Please start from the official SSH connection troubleshooting guide - most of the SSH issues i had (and yours situation is the same i had a few times) were solved by reset-ssh way. Helpful would be to see the serial console output (VM dashboard => Settings).
The fact that your IP changed is normal if you did not reserve that, it will change.

Cannot RDP to Azure VM after sysprep

I followed the instructions listed here to capture an image of my Azure VM:
Now I am unable to RDP to the VM - I get the generic message "Remote Desktop can't connect to the remote computer for one of these reasons:1,2,3 etc"
The VM I'm trying to connect to is: teamsitepoc.cloudapp.net:59207
Here's what I've tried:
I have checked that it's started.
Tried re-sizing to extra small then back to small.
Attached the disk that was captured, giving the following:
Could anyone please advise what else I can try to troubleshoot
It is entirely possible that you encountered the shutdown bug listed at the top of the page you link to.
Unfortunately rather than updating the documentation all they did was add a warning to the top of the page and left the incorrect instructions in the actual steps so likely many other people will encounter the same issue.
The workaround is available here: Image capture issue / VM unexpectedly started after guest-initiated shutdown
I also had this problem, pings went through from the VMs but no RDP port open.
Then I realized that windows was still updating!!

Windows Azure VM RDP issue

I followed this
http://blogs.technet.com/b/keithmayer/archive/2013/04/17/step-by-step-build-a-free-sharepoint-2013-lab-in-the-cloud-with-windows-azure-31-days-of-servers-in-the-cloud-part-7-of-31.aspx#.UX_iF7XvvQI
I created a VM using the datacentre Image it created successfully and the status shows Its running. I am trying to RDP It says
Remote Desktop cant connect to the remote computer for one of these reasons:
1) Remote access to the server is not enabled
2) The remote computer is turned off
3) The remote computer is not available on the network
make sure the remote computer is turned on and conencted to the network and that remote access is enabled.
I did check the endpoints the public port is open and also 3389 private port is open too. I did try with different release one with latest patch and the other with the second latest OS patch but I am still not able to RDP.
Thanks
Yeah I already figured out firewall in my organization is blocking it. I did update the answer but it did not show up I am trying again :)
Make sure your VM has reached the "Running" status. If it's still in one of its pre-running statuses (such as Provisioning), you won't be able to RDP.
Also: Be sure you don't try logging in with 'Administrator' (the default in the rdp login box). Choose localhost\yourusername.
I had a similar problem the other day. It was solved by going to the Azure Portal, selecting the VM Dashboard, then clicking "Connect" in the grey toolbar at the bottom. This will download an RDP file that contains the correct connection settings. You can then send that rdp file to others who you would like to give access to.
I just opened one of the files used to connect, and it looks like the only real difference is the port used.
full address:s:[vm name].cloudapp.net:62808
username:s:Administrator
prompt for credentials:i:1
I am not sure if all Azure VM's use 62808, but the default RDP port is 3389 so just copying the DNS from the Dashboard into the RDP address will NOT work without adding the correct port.
One more thing folks should check when having trouble connecting is password length.
I thought I would be all secure by using a guid for a password. RDP worked fine from home (on older XP RDP client), but not from office. At first I thought it was a firewall issue. After verifying with the IT guys that I had full outbound access, I looked a little closer at the RDP error message.
It was saying my credentials were rejected. Finally, I created a second account on the VM and gave it RDP access. I was able to log in fine. The only difference between the two users was this time I didn't bother with a long password.
So I shortened the password on my main account and got in with no problem. I'm not sure what the limit is, but it seems to be less than 32.

Resources