RSA key

Hey y'all,

I need to set up an sftp connection using an RSA key. Do I still need to use PuTTY (like I saw when I searched and found responses for DOpus 8 from Leo (plus ça change !)?

B

I found where to put a keyfile, but it's still not working. I'll persevere...

B

Okay, here's my log file:

Opening Connection 161.35.211.60:22
Server version: SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Directory_Opus
Server supports delayed compression; will try this later
Doing ECDH key exchange with curve Curve25519 and hash SHA-256
Server also has ecdsa-sha2-nistp256 host key, but we don't know it
Host key fingerprint is:
ssh-ed25519 256 3b:a0:b8:69:83:12:8a:47:33:8d:a3:7f:ff:fb:a9:15
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA-256 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA-256 server->client MAC algorithm
Reading key file "X:\Dropbox\LightWaveDigital\Site\Docs\ben_rsa"
Unable to use this key file (OpenSSH SSH-2 private key (new format))
Unable to use key file "X:\Dropbox\LightWaveDigital\Site\Docs\ben_rsa" (OpenSSH SSH-2 private key (new format))
Using username "ben".
Disconnected: No supported authentication methods available (server sent: publickey)
SSH: Fatal: Disconnected: No supported authentication methods available (server sent: publickey)
Connection closed

These lines:

Unable to use this key file (OpenSSH SSH-2 private key (new format))
Unable to use key file "X:\Dropbox\LightWaveDigital\Site\Docs\ben_rsa" (OpenSSH SSH-2 private key (new format))

are the ones posing the problem. I installed Filezilla and can connect to the remote site just fine (but now I need to get rid of the increasingly-spammy Filezilla, which has snuck Avast onto my machine and changed my default browser!)

B

The key needs to be saved as a version 2 PPK file (Key / Parameters for saving key files in PuttyGen).

It's not me generating the key and because it works with Filezilla, they aren't bothered.

B

You can load the existing key into PuttyGen and then save it back out in the v2 format to convert it.

I don't know if I'm going to need to make a matching pair? Certainly the three tries I've had at fixing this now have failed, but it is getting on for 2 in the morning. I'll try again on Monday. Thanks for your help!

B

It doesn't affect the key at the other end. It's still the same public key, just saved to disk in a slightly different way.

1 Like

How can I make sure the details save are updated for new ftp connections? I tried changing the key and the ftp log says it's still trying the previous, unsuccessful key type.

B

Okay, to get DOpus to use different versions of the key, I need to quit and restart DOpus.

And none of the five choices work. :frowning:

What five choices are you referring to?

The types of keys to generate?

See the screenshot I posted above?

Ah, I see. It's still not connecting with the v2 RSA option, but I'll try the others. It is irritating that filezilla just gets through with no modification. Also that I have to quit and restart DOpus each time.

I think those options are only relevant when generating a new key which isn't what you want to do. You want to load the existing key in ("Load an existing private key file"), and then resave it ("Save private key") in v2 format. The only option you should have to change is to set the key format to v2 (and that's only an option you have to change once, since it should remember that you've chosen that in the future).

That's what I did. It didn't work and I'm not sure why I did to change it in the first place?

This is what I get now:

Opening Connection 161.35.211.60:22
Server version: SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.10
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Directory_Opus
Server supports delayed compression; will try this later
Doing ECDH key exchange with curve Curve25519 and hash SHA-256
Server also has ecdsa-sha2-nistp256 host key, but we don't know it
Host key fingerprint is:
ssh-ed25519 256 3b:a0:b8:69:83:12:8a:47:33:8d:a3:7f:ff:fb:a9:15
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA-256 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA-256 server->client MAC algorithm
Reading key file "X:\Dropbox\LightWaveDigital\Site\Docs\keys\Private3-SSH-1.ppk"
Using username "ben".
Offered public key
Server refused our key
Server refused our key
Disconnected: No supported authentication methods available (server sent: publickey)
SSH: Fatal: Disconnected: No supported authentication methods available (server sent: publickey)
Connection closed

"Server refused our key" wasn't in the log before now, which means it's a different error to before.

Does the same key file work in FileZilla? (I know the original key did, but it's worth testing with the one you're using now in case it's different.)

Yes, that still connected in Filezilla.