What SSH key type to use for SFTP

This forum is for all Flare issues related to using Source Control.
Post Reply
lguser
Propeller Head
Posts: 27
Joined: Fri Apr 04, 2014 10:11 am

What SSH key type to use for SFTP

Post by lguser »

When generating keys using PUTTYGEN, what key type does Flare support?
SSH-1 (RSA)
SSH-2 (RSA)
SSH-2 (DSA)

What is the number of bits to use to generate key? 1024, 2048?

Tried using SSH-2 without success. Getting error Unable to load credentials for server.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: What SSH key type to use for SFTP

Post by doc_guy »

I can't find this information in the documentation anywhere. You may need to contact MadCap support directly. If you do, please report back. I'd be very interested in the answer to this question.
Paul Pehrson
My Blog

Image
lguser
Propeller Head
Posts: 27
Joined: Fri Apr 04, 2014 10:11 am

Re: What SSH key type to use for SFTP

Post by lguser »

Spent about 25 minutes with Tech Support and they could not figure it out.

So after several hours of testing all different combinations a SWAG paid off.

In Puttygen.exe
1. Used the default SSH-2 RSA Putty setting.
2. Create the SSH keys with a Key Passphrase

In Flare Destination (besides the obvious) the ambiguous settings are:
1. Authentication = Both
2. Key Password = Key Passphrase
3. Login Credentials - Password = Key Passphrase

Step 3 was the main issue since I was not using a password to access the server, I left the field blank. Flare requires a password in order to Set The Credentials. Using the SSH key Key Passphrase satisfied the requirement. Unfortunately this is not clearly defined in the Help text.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: What SSH key type to use for SFTP

Post by doc_guy »

Awesome! Good work! Thanks for sharing it back here.
Paul Pehrson
My Blog

Image
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: What SSH key type to use for SFTP

Post by doc_guy »

I'm trying to set this up based on your information. I'm getting the error "Publish failed: Failed to recognize key format. Supported formats are OpenSSH, SSH.com, PuTTY.

I'm generating my public key from cPanel on my website, and it is generating a .pub file (the public key) and a file with no extension (the private key). The password is linked to the public key, right?

Here are my settings:

Type: SFTP

Server settings:
Host Name: <my web server>
Port: 22
Connection Mode: Passive

SFTP Settings:
Server Validation: None
Hosts file: <Grayed out>
Authentication: Both
Key File: <local file path to PUBLIC key file>
Key Password: The password I generated with my public key

Destination Settings:
Directory: <publish directory on my server>
<Other settings ignored>

Credentials:
username: my cpanel user name to log in to my server
password: the password I generated with my public key
Paul Pehrson
My Blog

Image
lguser
Propeller Head
Posts: 27
Joined: Fri Apr 04, 2014 10:11 am

Re: What SSH key type to use for SFTP

Post by lguser »

Paul, you are close

With PuttyGen, I entered the Passphrase and the generate the public and private keys. So I think the Passphrase is applied to both.

in the Key File I used the private key. Our IT people added the public key to the server configuration as authorized user.

What was confusing since our configuration does not need a Password for Logon Credentials I left it blank which caused the publishing failure. In a ditch effort I entered the same Passphrase in the Key File password and Logon Credentials and the publishing succeeded.
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

Re: What SSH key type to use for SFTP

Post by chrispitude »

Admins: please delete, my server is FTP, not SFTP. Durrr.
Last edited by chrispitude on Thu Sep 28, 2017 10:00 am, edited 1 time in total.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: What SSH key type to use for SFTP

Post by RamonS »

I think there is a command to only publish existing output again.
Corinna
Propeller Head
Posts: 17
Joined: Mon Mar 20, 2017 5:56 am

Re: What SSH key type to use for SFTP

Post by Corinna »

lguser wrote:In a ditch effort I entered the same Passphrase in the Key File password and Logon Credentials and the publishing succeeded.
Thank you so much for sharing this. This literally saved my a** today.
Post Reply