0
votes

Been struggling with this all day.

Trying to set up SFTP to a new VM on googles compute engine following this walkthrough.

Step 1 is fine.

Step 2 seems to generate the keys OK but i dont get asked for a pass phrase & then i get the following:

enter image description here

If i then re-run the command after the keys are generated i get the following:

enter image description here

I've found a few questions with the same error but not anything thats fixed the issue.

I've tried logging into GCE console and adding the ssh keys manually but the error remains.

I've tried removing the whole project and starting again with the same result.

I've tried continuing & connecting with Filezilla - obviously doesn't work.

Output from Serial Console:

Feb 23 19:15:21 magento-test sshd[8643]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Feb 23 19:15:22 magento-test sshd[8643]: error: buffer_get_bignum2_ret: negative numbers not supported [preauth]
Feb 23 19:15:22 magento-test sshd[8643]: error: key_from_blob: can't read rsa key [preauth]
Feb 23 19:15:22 magento-test sshd[8643]: error: userauth_pubkey: cannot decode key: ssh-rsa [preauth]
Feb 23 19:15:22 magento-test sshd[8643]: error: Received disconnect from 151.227.74.143: 14: No supported authentication methods available [preauth]

UPDATE ****

I've made some progress thanks to this question, this has given a work around for a known bug, which has allowed me to create an ssh key & get an active connection in putty.

However i'm still stuck with getting SFTP access, using the same key (that connects through putty) I just get a timeout

Status: Connecting to 104.155.66.130...
Response:   fzSftp started, protocol_version=4
Command:    keyfile "C:\Users\Ben\.ssh\google_compute_engine.ppk"
Command:    open "[email protected]" 22
Error:  Connection timed out after 20 seconds of inactivity
Error:  Could not connect to server

Any help at all appreciated

2
what errors do you see in server log (from console)? Why was the key rejected? - Jakuje
It looks like a corrupted key somehow. Can you generate new one, on your computer, copy the public part to the server (removing the current) and try to connect using Filezilla or PuTTY? - Jakuje
ok, these are the steps i've taken... deleted the key from my GCE console / deleted the keys from my PC / regenerated the keys Same error. (top screenshot) It has re-created the key in my GCE console though & it looks ok. - Ben
Yes, Google has automatically added the key to the console - Ben

2 Answers

0
votes

This is a known issue with GCE and has been fixed for the next version of Google Cloud SDK 98.0.0

0
votes

Looks like sshd server does not accept ssh-dss public key for authentication. I can suppose you should generate new type of key that google supports.