0

I'm very new in this subject, but the problem is: I can't access files from a website to make small html edits. The only thing I know is that I need to make it using SSH.

What I've tried:

  • I generated a private and a public key of type SSH-1 (RSA) using PuTTYgen,
  • At dreamcompute Access & Security panel, I imported the public key generated,
  • At PuTTY, I placed my site IP at Host Name field. In Connection->Data, I placed the username. In SSH section, I chose 1 as preferred SSH protocol version. And at SSH->Auth I set the private key path.
  • Finally, I opened the connection.

I'm getting this error message:

Unable to use key file

What am I missing? Is that the right way to access the files?

João Paulo
  • 155
  • 1
  • 1
  • 6

3 Answers3

2

Use SSH protocol version 2.

1 & 2 use different private key formats, SSH 1 is also almost 10 years old.

Dylan Knoll
  • 480
  • 2
  • 9
  • The server does not accept public keys in SSH 2 format or there is a way to manipulate them in the way the server accepts? – João Paulo Jul 20 '15 at 20:40
  • That's PuTTY's fault; it uses a nonstandard format. You'll need to convert it first. – Michael Hampton Jul 20 '15 at 20:42
  • Is there a converter for it? – João Paulo Jul 20 '15 at 20:44
  • Felix, if you've only just created the private key for this SSH connection you may just want to generate an SSH-2 key instead rather than converting. Of course you would also need to upload this key to DreamCompute and authorize it for the VPS you are connecting to. – Dylan Knoll Jul 20 '15 at 20:47
0

PuTTY requires that you convert your private key into a .ppk file before it can be used to connect via ssh. To do this, open up the PuTTY Key Generator (puttygen.exe), click the Conversions menu then “Import Key”. Browse to the folder that contains the *.pem file you downloaded from the DreamCompute dashboard, or the private key you created outside the Dashboard. You can give the key a name in the “Key comment” field, and when finished click the “Save private key” button to save it into a .ppk file.

Now you can open PuTTY and navigate to the Connection -> SSH -> Auth setting page to click the “browse” button near the “Private key file for authentication” field. Select the .ppk file you generated and then click open. You can now navigate to the “Session” setting page, and enter into the host name field “dhc-user@” followed immediately by your instance’s public ip address. If using CoreOS, use “core@” instead of “dhc-user@”. Click Open to start your session.

Full instructions at https://help.dreamhost.com/hc/en-us/articles/216201547-Connect-to-your-instance-with-ssh-keys

0

In your putty generator, once you have generated the key, you can save the private key file first in a folder of your choice.

Next, you can re-import the private key in the Putty Generator (refer image below)

Now choose Export OpenSSH key and save the file to your folder.

You can now use the new OpenSSH private key instead and it will not give you any error. Putty Keygen Converter

CoderX
  • 131
  • 3