secure file transfer with public key


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users secure file transfer with public key
# 1  
Old 01-05-2009
secure file transfer with public key

Hi,

I was provided with
  1. Server IP
  2. Username and Password (worked when tested basic FTP)
  3. Public key (GnuPG v1.0.6)

They refuse when I send it using basic FTP and insists for encryption.

I have Solaris 10 and Linux in my environment.

How can I encrypt and send them securely? It's OK even if it's a manual process. Once it works, I will later think on automating the transfer process.

Please advise.

TIA
Prvnrk

Last edited by rbatte1; 12-02-2016 at 07:15 AM.. Reason: Converted to formatted number-list
# 2  
Old 01-05-2009
I don't understand how FTP is insisting for encryption. Smilie

But you need to use gpg. It comes with most Linux distros and it is available on sunfreeware for Solaris.

First you need some keys of your own. You can do without, but you will be constantly fighting the program. So do:
pgp --gen-key
It will ask questions...take the defaults where provided and answer the others.

Next import that key you have:
pgp --import somefilecontainingkey

Now you should be able to list that key you imported...
pgp --list-keys

Sign the key you imported to assert that you trust it. This is why you needed to generate your own keys.

pgp --sign-key keyid

There should be an email address associated with that key. Let's say it is joe.blow@sample.com. Also let's say you have a file called secret.txt to send. So do:

gpg --recipient joe.blow@sample.com --encrypt secret.txt

This creates a file called secret.txt.pgp. Now you ftp secret.txt.pgp to the other end. When Joe Blow wants to decrypt the file, he will use:
gpg secret.txt.gpg
And a file called secret.txt will appear in his directory.

I have tried all of these steps between a Linux and a Solaris system and they worked for me. Your mileage may vary depending on your setup.
# 3  
Old 01-05-2009
Download, compile, and install SSH. Use SFTP from the SSH package. This will encrypt the password as well as data during transmission. While GPG/PGP will encrypt the data, FTP is still not secure. Passwords are still send plain text via FTP.
Padow
# 4  
Old 01-05-2009
Hi Perderabo,

Thanks for the response.

The other-end party (not FTP) insisting for encrypted files, Sorry for my bad english.

I did the below (unfortunately before i saw your reply) and uploaded files.
  1. downloaded and installed all required packages from sunfreeware
  2. "/usr/local/bin/gpg --import" (without creating my own keys) but imported their pub successfully
  3. "gpg --list-keys" shows correct output (there's no e-mail associated with but just UID)
  4. gpg --yes -eq -r "their-UID" -o encrypted_file.pgp file_to_encrypt

It encrypts but gives warning as below

Code:
++++++++

gpg: 268C2A61: There is no assurance this key belongs to the named user

 <pub key info>

It is NOT certain that the key belongs to the person named
in the user ID.  If you *really* know what you are doing,
you may answer the next question with yes.

Use this key anyway? (y/N) y

++++++++

I uploaded the encrypted files

My doubts:
  1. is it really required to create own-keys?
  2. how to avoid this above warning? (perhaps, by creating own keys and sign their pub keys?)

I noticed few "pgp" in your solution and I assume mistyped and should be "gpg". am I correct?

thanks for the help,
Prvn

Last edited by rbatte1; 12-02-2016 at 07:17 AM..
# 5  
Old 01-05-2009
Essentially the same thing. gpg is GNU freeware, where pgp is Pretty Good Privacy which is a premium application.
Padow
# 6  
Old 01-07-2009
Yes I mistyped. I am using gpg, gnu privacy guard, exclusively. There are many ways to use it and I showed only one. To get rid of the warning you must establish trust for the key and signing it yourself is the easiest way. So create your own keys and sign the key.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Secure Copy - File Transfer between 2 server

Using RCP command we can transfer file from one server to another server. While transferring we can rename the file also e.g. File name = FILE123.txt (lying on Source server = oldserver) Target Server Name = newyour Renamed File = FILE456.txt rcp FILE123.txt newyour:./FILE456.txt... (1 Reply)
Discussion started by: Pash
1 Replies

2. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

3. UNIX and Linux Applications

Central Location for all ssh Keys and Settings Unattended Secure File Transfer

I am developing an application that submits command line file transfers using ssh (Sun to Sun) and Tectia ssh (Sun to Windows Server) embedded in the code. Potentially many different trusted people will start the programs. Is there a way to have all the settings and keys localized so that there is... (0 Replies)
Discussion started by: PowersThatB
0 Replies

4. UNIX for Dummies Questions & Answers

VSFTPD Public Key Help

Hi all Ive setup a VSFTPD server and im forcing SSL encryption. I have made a key and it works perfectly. I have a client who wants to connect but is using software that needs the key to be added before he can connect. Does he need me to send the key i created and that the VSFTPD.conf... (0 Replies)
Discussion started by: mokachoka
0 Replies

5. Shell Programming and Scripting

secure upload using public key

Hi, i was provided with 1. Server IP (Remote) 2. Username and Password (worked when tested basic FTP) 3. Their Public key (GnuPG v1.0.6) They refuse when i upload using basic FTP and insists for encryption. I have Solaris 10 and Linux in my environment. How can i encrypt and upload... (0 Replies)
Discussion started by: prvnrk
0 Replies

6. Shell Programming and Scripting

Secure File Transfer Protocol

Hi, Is there any protocol other than SFTP to transfer the file using secured connection SSH. ? Regards, Arthik (2 Replies)
Discussion started by: arthikbabu
2 Replies

7. Shell Programming and Scripting

Question about secure file transfer

Hi all, I am running a large scale business and some time I have to transfer large and very important data files to my business partner. I fear about my data because there are many of my business competitors who will definitely try to steal my important data. So there is huge amount of risk... (0 Replies)
Discussion started by: camden
0 Replies

8. Cybersecurity

Secure File Transfer for Mainframe systems

Hi guys, I would like to transfer files from UNIX machine to Mainframe system (using UNIX machine as client). The transfer process needs to be secure (i.e. data sent thro network should be encrypted using 128-bit encryption algorithm). I came to know that SFTP server is not available for Mainframe... (3 Replies)
Discussion started by: sydneymoon
3 Replies

9. AIX

How to use SSH Secure File Transfer tool from windows to AIX without password?

If I use SSh Secure File Transfer tool on Windows, I want to transfer file from windows to AIX without password, how to do it? (6 Replies)
Discussion started by: rainbow_bean
6 Replies

10. UNIX for Advanced & Expert Users

SSH - Public key

When should one have to generate a public key on a Server when the public key is already created and used by other clients? Thanks, Rahul. (6 Replies)
Discussion started by: rahulrathod
6 Replies
Login or Register to Ask a Question