0

After performing apt-get upgrade on my Ubuntu 18.04.1 LTS server running on Google Compute Engine I was unable to connect to my server via the WEB SSH. The window is stuck with the following message:

Transferring SSH keys to the VM.
The key transfer to project metadata is taking an unusually long time. Transferring instead to instance metadata may be faster, but will transfer the keys only to this VM.

After some investigation, thanks to frequent snapshots it transpired that apt-get upgrade has updated the openssl to version 1.1.1a-2+ubuntu18.04.1+deb.sury.org+1. This upgrade seems to disable the communication between the WEB SSH and the server. Has only expired this issue before?

  • What did you find in the logs? – Michael Hampton Dec 20 '18 at 18:30
  • in the auth.log it only displays the following messages: Dec 20 18:19:48 test-hornet sshd[3762]: Connection closed by authenticating user chrisebejermt 173.194.92.33 port 48112 [preauth] Dec 20 18:19:58 test-hornet sshd[3764]: Connection closed by authenticating user chrisebejermt 173.194.92.33 port 52276 [preauth] – Christopher Ebejer Dec 20 '18 at 18:33
0

Sometimes these types of issues are transient and the following SSH connection attempt succeeds if the instance was still booting up during the initial attempt.

The error you found in the auth.log is very generic, you can review the serial console output to view some additional details to help you troubleshoot the problem.

If you identify the possible root cause of the issue, you can enable interactive access to the serial console to fix it.

If you don’t have the root password, you can:

1. Go to the VM instances page in Google Cloud Platform console. 
2. Click on the instance for which you want to add a startup script. 
3. Click the Edit button at the top of the page.
4. Click on ‘Enable connecting to serial ports’
5. Under Custom metadata, click Add item. 
6. Set 'Key' to 'startup-script' and set 'Value' to this script: 
#! /bin/bash 
useradd -G sudo USERNAME 
echo 'USERNAME:PASSWORD' | chpasswd 
7. Click Save and then click RESET on the top of the page. You might need to wait for some time for the instance to reboot. 
8. Click on 'Connect to serial port' in the page. 
9.  In the new window, you might need to wait a bit and press on Enter of your keyboard once; then, you should see the login prompt. 
10.. Login using the USERNAME and PASSWORD you provided.

Serial console access is not secure so it is recommended that you disable it once you complete your work.

You can also debug this by running SSH Diagnosis scripts from a Linux Guest environment which are included with Linux instances created using Google-provided public images.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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