Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO

Is there a possibility to manage public keys via command line?

0 votes
asked Apr 25 in CompleteFTP by HansHuebner (190 points)
I have 200+ SAN switches which have to do uploads via SCP. I'm looking urgently for a way to manage the public keys of these switches in CompleteFTP. (Import and Remove)
commented Apr 25 by support2 (143,750 points)
Does every switch have a different username and keypair?
commented Apr 26 by Admin (2,230 points)
HansHuebner: Same switch user name, same FTP user. Every switch has its own keypair.

1 Answer

+1 vote
answered Apr 26 by Admin (2,230 points)

We're currently implementing an API that will eventually allow modification of all parts of the configuration, but it won't be ready for some months.  The best we can offer at this point is that you modify the configuration file directly.  It's not something we generally advise, but it works as long as you're careful.  In particular, make sure that the CompleteFTPService is not running or your changes may be overwritten..  The configuration file is called config.sdf and is in C:\ProgramData\Enterprise Distributed Technologies\Complete FTP.  It's a SQL Server CE 3.5 database, so there are plenty of ways to access it programmatically.  The fields that store the public keys are SSHPublicKeyRSA and SSHPublicKeyDSA in the User table.  Their datatype is IMAGE (even though the data it stores is actually text).  The format of each individual key is the OpenSSH format for public keys.  If the first line is MULTI then CompleteFTP will read multiple keys from the field, so it needs to look something like this:

ssh-rsa ACBDEF0123456789....
ssh-rsa ACBDEF0123456789....

I hope that provides you enough information, otherwise please ask for more details.

commented Apr 26 by HansHuebner (190 points)
Sounds very good, thanks a lot!
asked Apr 26 in CompleteFTP by HansHuebner (190 points) Update SQL command