EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PGP Private Key

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#2815
Posted: 05/02/2007 05:32:34
by Stefano Panuccio (Basic support level)
Joined: 04/24/2007
Posts: 15

Hi,
I need to connect to a Sftp Server with PGP Private Key.
I try to insert the pgp private key in the follow way:

TElSSHKey privateKey = new TElSSHKey();
privateKey.LoadPrivateKey(strKey,strPassword);
sshClient.KeyStorage.Add(privateKey);

where sshClient is an instance of Class TElSSHClient sshClient.

The runtime error is: Use the "new" keyword to create an object instance, as regards sshClient.KeyStorage.Add(privateKey);

Why it happens?
The language I've used in C#.

Thank You very much

Stefano
#2817
Posted: 05/02/2007 05:42:42
by Ken Ivanov (EldoS Corp.)

SecureBlackbox does not support use of PGP keys for SSH authentication. So it is likely that the key is not loaded at all (please check the result of LoadPrivateKey() call).

Besides, you also have to create the key storage object:
sshClient.KeyStorage = new TElSSHMemoryKeyStorage();
#2818
Posted: 05/02/2007 06:02:38
by Stefano Panuccio (Basic support level)
Joined: 04/24/2007
Posts: 15

I have created the Key Storage Object.
I have checked the result of LoadProvateKey() call
the error is
3331 (0x0D03) error of reading from file

How can autontichate to the server in this way?

Thank you.

Stefano
#2819
Posted: 05/02/2007 06:19:50
by Eugene Mayevski (EldoS Corp.)

You can't load PGP key to ElSSHKey instance.

SecureBlackbox doesn't support PGP for SSH authentication.

Please tell us, what server software you are connecting to. It's possible, that all you need is extract the key raw data from the PGP keypair and load this raw data to ElSSHKey.


Sincerely yours
Eugene Mayevski
#2820
Posted: 05/02/2007 06:20:08
by Ken Ivanov (EldoS Corp.)

Are you sure that your SSH/SFTP server allows client authentication based on *PGP* private keys? Most of existing SSH implementations use OpenSSH or X.509 private keys for authentication.
#2821
Posted: 05/02/2007 08:44:56
by Stefano Panuccio (Basic support level)
Joined: 04/24/2007
Posts: 15

The Server SFTP I try to connect allow PGP private key. I connect to it using WinSCP3 with a PGP Private Key Configuration.
How I can "extract the key raw data from the PGP keypair and load this raw data to ElSSHKey".

Best Regards

Stefano
#2822
Posted: 05/02/2007 09:03:45
by Eugene Mayevski (EldoS Corp.)

Please give us the name of the server software. Without it we can't help you.


Sincerely yours
Eugene Mayevski
#2830
Posted: 05/03/2007 02:10:17
by Stefano Panuccio (Basic support level)
Joined: 04/24/2007
Posts: 15

The Server Information are:

SSH Protocol Version: SSH-2
SSH Implementation:
#2831
Posted: 05/03/2007 02:11:33
by Stefano Panuccio (Basic support level)
Joined: 04/24/2007
Posts: 15

Sorry

Now I write the next...
#2832
Posted: 05/03/2007 02:14:17
by Stefano Panuccio (Basic support level)
Joined: 04/24/2007
Posts: 15

The Server Information are:

SSH Protocol Version: SSH-2
SSH Implementation: OpenSSH_3.9p1
Encryption Algorithm: aes
Compression: NO
File Transfer Protocol: SFTP(v2)
Server Host Key fingerprint: ssh-rsa 1024 bc:ff:97:ee:a7:08:5e:8d:9e:4d:f0:4c:77:07:1a:94

A lot of Thanks

Stefano
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 7824 times

Number of guests: 2, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!