Beginner's DreamCompute problems (SSH)


#1

Yup, I’m having problems from the get-go.

I followed this entry on how to create SSH keys from within the DreamCompute dashboard:

Then I followed this entry on connecting using Windows:

Now, I don’t BELIEVE the “Key comment”/name matters in PuTTY Key Generator? And I saved it as “SSH-2 RSA”, as that was what was chosen by default. With 2048 bits. In PuTTY I used the .ppk file extracted fro the Key Generator. In the host name field I use the exact string of dhc-user@, and I’ve tried @.

I always get the same message:
Server refused our key.

Is there some step so simple it’s not mentioned, that I just don’t know about? Or have I messed up in some other way? Ideas? Suggestions?


#2

How did you create the virtual machine? The only thing I can think of is that you have not assigned an SSH key to it… this can happen if you use the dashboard on https://iad2.dreamcompute.com/project/instances/. Try creating a new machine using https://cloud.dreamhost.com and see if that changes things. If this works, then you know the issue :slight_smile: If you still have issues, then it’s possible that your SSH key conversion may have gone wrong somewhere.

Keep us posted.


#3

In interest of helping anyone else with this in the future, who is new and can’t figure it out:

Creating a KeyPair with the “Access & Security” panel, and then using that pair in the “Quick Launch” panel, does not work.

They way to do this:

When you create an SSH key pair via the “Access & Security” panel you are prompted to download the key. Do so.
Open it in PuTTYkeygen (downloadable tool). In PuTTYkeygen, add your own comment and passphrase (akin to a prompt and password, respectively), and save a private key.

THEN, create the instance of your server in the “Quick Launch” panel.

When prompted for an SSH key at the bottom, add a new one! DO NOT use the one generated in the “Access & Security” feature.

Here, copy and paste the public SSH key displayed in PuTTYkeygen.

You can follow the rest of the instructions located here:

I thought the SSH key created on the site, could be used on the site. That seems reasonable to me, someone who doesn’t know about that kind of thing, but it’s wrong. And at least now, anyone else equally uninformed will know.

/edit: Oh! Thanks for the response smaffulli. I had this open from this morning checking to see if anyone had responded yet. I didn’t refresh before posting this.


#4

@jeffool I’m glad to read that you fixed the issue. What you suggest though should not be necessary. I suspect the first key you generated could have been mangled somehow.
Now that you have a key pair setup and working, you can keep using that one for all your new servers.


#5

Hm, well I didn’t actually touch the key. Initially, before it worked, I just downloaded a copy and made the private key using SSHkeygen. So I’m not sure how it could’ve been affected.

(And sorry, I just realized I hadn’t subscribed to threads on creation, I’ve changed that in my profile now.)


#6

You made a private key using sshkeygen? If I understand you correctly, that’s the source of the problem as you may have created a different keypair this way … SSH keys work in pairs: there is a private key and the corresponding public one. It’s a principle similar to that of locks and keys: the lock on your front door is (somewhat) public while you treat the key as something personal. The two together work but you can’t use the key with a different lock, and viceversa.

My advice is to create your own set of keys (most of the times, you only need one) and use that with your services.


#7

No, I didn’t make a new private key. I downloaded the key pair (.pem file) created on the Dreamhost site. That’s described here: https://help.dreamhost.com/hc/en-us/articles/214843617-How-to-upload-an-SSH-key-via-the-web-UI

I loaded that into PuTTYkeygen and extracted the private key (.ppk file) as described here: https://help.dreamhost.com/hc/en-us/articles/216201547-Connect-to-your-instance-with-ssh-keys

But that didn’t work. To make it work, I had to copy and paste the public key from PuTTYkeygen as well. I don’t know why the one on-site didn’t work. But the uploaded one, the same, seems to work just fine.

It’s still entirely possible I messed something up somehow, but I have that working now, so that’s something.

Now on to figuring out why VNC worked once, but not again!


#8

That still puzzles me :slight_smile: I’d love to understand how to fix the documentation to make it more clear but something’s amiss … glad to read that it works for you anyway, we can move on… the next puzzle: what do you use VNC for? :slight_smile: