Go Back   FlashFXP Forums > >

General Discussion Need help? Have a problem? Let us help you. Bug reports and feature requests should be made using the Bug Tracker or Feature Tracker

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 03-05-2014, 04:40 PM   #1
cog01
Junior Member
FlashFXP Registered User
 
Join Date: Jun 2012
Posts: 6
Default FlashFXP with Amazon EC2 SSH keys

Hi there

When adding an Amazon EC2 instance as a site I want to use SSH keys for authentication... what's the correct procedure from the Amazon keypair .pem file to the key import in FlashFXP?

I've tried creating new public and private keys from the .pem using PuttyGen (which I'm familiar with for putty access) but I'm not really sure what the correct procedure and settings are within FlashFXP.

Thank you
cog01 is offline  
Old 03-06-2014, 09:41 AM   #2
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

Launch FlashFXP then from the main menu > Sites > Key Manager

On the Key Manager dialog click the Import button

Give the new import a meaningful name, this name will be used to reference the key pair.

Change the Type to RSA/DSA key for SFTP

If you have both the private and public key you can import them here, select the .pem files. if a single .pem contains both keys that's fine too, use the same file for both.

FlashFXP supports most key file formats, PuTTY .ppk, OpenSSH, ssh.com.

Adjust the remaining settings as desired and then click the save button.

In the Site Manager change the Login Type to Key Based, select your imported key and then click the save button.

Finally connect to the site to test the changes.
bigstar is offline  
Old 03-06-2014, 04:04 PM   #3
cog01
Junior Member
FlashFXP Registered User
 
Join Date: Jun 2012
Posts: 6
Default

Thank you!

It doesn't work precisely like that but I got it working with a small tweak:

Quote:
If you have both the private and public key you can import them here, select the .pem files. if a single .pem contains both keys that's fine too, use the same file for both.
EC2 provides a single .pem file for the key pair. Selecting the same file for both produces an error (invalid public key).

I used PuttyGen to open the .pem file and saved the public key from there. PuttyGen itself isn't very clear; when you save the public key, no file extension is suggested. I used .pem; then followed your instructions again using the keypair .pem file from Amazon as the private key file and my saved .pem as the public key file.

That worked perfectly.

I then deleted the key from FlashFXP and renamed the public key from publickey.pem to publickey.anything. That worked too. Then I removed the extension completely, renaming the public key just: publickey. That worked the same way.


If you're able to make FlashFXP accept the same .pem file for both that might be simpler, or maybe, since EC2 is a huge platform, have some tips / FAQ for it.

Either way, thank you.

People looking for FlashFXP and EC2 key pair assistance who find this thread might also benefit from knowing that the username for the Amazon AMI images in EC2 is ec2-user and the username for Ubuntu images is ubuntu.

Finally can I just again comment how excellent FlashFXP support is. It's rare to find developers as committed to their product as you are.
cog01 is offline  
Old 03-06-2014, 11:11 PM   #4
MxxCon
Super Duper
FlashFXP Beta Tester
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 3,881
Default

cog01, this link describes differences between various ssh key file formats https://serverfault.com/questions/97...file/9717#9717
__________________
[Sig removed by Administrator: Signature can not exceed 20GB]
MxxCon is offline  
Old 03-07-2014, 07:28 AM   #5
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

After seeing your reply I decided to look into this to see exactly what was going on.
What I found was that the .pem file created by Amazon EC2 contains just the private key.
In this case you would leave the "public key file" field blank and just select the private key file.
FlashFXP will connect to the ssh server just fine without a public key, as only the private key is used.
bigstar is offline  
Old 03-09-2014, 02:46 PM   #6
cog01
Junior Member
FlashFXP Registered User
 
Join Date: Jun 2012
Posts: 6
Default

Thank you, again.

MxxCon I appreciated the link, interesting reading and very helpful.

bigstar again, thank you for further testing and for the information. It's very helpful to know that the Amazon pem only contains the private key. Now I know pem is a container file this makes sense.
cog01 is offline  
Closed Thread

Tags
amazon, correct, flashfxp, keys, procedure

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:22 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)