Sponsored Content
Top Forums UNIX for Advanced & Expert Users secure file transfer with public key Post 302273731 by Perderabo on Monday 5th of January 2009 03:58:02 PM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
AMGPGCRYPT(8)						  System Administration Commands					     AMGPGCRYPT(8)

NAME
amgpgcrypt - reference crypt program for Amanda public-key data encryption SYNOPSIS
amgpgcrypt to be called by Amanda only DESCRIPTION
amgpgcrypt calls gpg to perform public-key data encryption on Amanda backup. amgpgcrypt will search for the gpg program in the following directories: /usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin amgpgcrypt sets GNUPGHOME to $AMANDA_HOME/.gnupg where gpg will look for the gpg keys. amgpgcrypt uses the public key to encrypt the Amanda data and uses the private key to decrypt the Amanda backup data. Thus, passphrase is only required at the time of data restore. KEY AND PASSPHRASE
amgpgcrypt uses the private key to decrypt Amanda backup data. It is very important to store, manage and protect the key and the passphrase properly. Encrypted backup data can only be recovered with the correct key and passphrase. HOW TO CREATE ENCRYPTION KEYS AND PASSPHRASE FOR AMGPGCRYPT
Store the passphrase that you used in following "gpg --gen-key" command inside the home-directory of the AMANDA-user($amanda_user) and protect it with proper permissions: echo my_secret_passphrase > ~$amanda_user/.am_passphrase chown $amanda_user:disk ~$amanda_user/.am_passphrase chmod 700 ~$amanda_user/.am_passphrase Run "gpg --gen-key". Below is an example: $ gpg --gen-key gpg (GnuPG) 1.2.6; Copyright (C) 2004 Free Software Foundation, Inc. This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the file COPYING for details. Please select what kind of key you want: (1) DSA and ElGamal (default) (2) DSA (sign only) (4) RSA (sign only) Your selection? 1 DSA keypair will have 1024 bits. About to generate a new ELG-E keypair. minimum keysize is 768 bits default keysize is 1024 bits highest suggested keysize is 2048 bits What keysize do you want? (1024) Requested keysize is 1024 bits Please specify how long the key should be valid. 0 = key does not expire (n) = key expires in n days (n)w = key expires in n weeks (n)m = key expires in n months (n)y = key expires in n years Key is valid for? (0) 6m Key expires at Sun 06 Aug 2006 03:51:25 PM PDT Is this correct (y/n)? y You need a User-ID to identify your key; the software constructs the user id from Real Name, Comment and Email Address in this form: "Heinrich Heine (Der Dichter) (heinrichh@duesseldorf.de)" Real name: amandabackup Email address: Comment: gpg keys for amandabackup You selected this USER-ID: "amandabackup (gpg keys for amandabackup)" Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o You need a Passphrase to protect your secret key. We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. public and secret key created and signed. key marked as ultimately trusted. pub 1024D/4417A8CB 2006-02-07 amandabackup (gpg keys for amandabackup) Key fingerprint = 139C 6369 44FC 7F1A 655C E5E9 7EAA 515A 4417 A8CB sub 1024g/8C3A6A78 2006-02-07 [expires: 2006-08-06] FILES
$AMANDA_HOME/.gnupg/pubring.gpg The public key. amgpgcrypt encrypt data with this public key along with the cipher algorithm. $AMANDA_HOME/.gnupg/secring.gpg The private/secret key. It's only needed during amrecover/amrestore. Store and protect it properly during other time. $AMANDA_HOME/.am_passphrase The passphrase. It's only needed during amrecover/amrestore. Store and protect it properly during other time. BUGS
Amanda has problem with gpg mdc(modification detection code) in the binary mode. amgpgcrypt calls gpg with mdc disabled SEE ALSO
amanda(8), amanda.conf(5), amcrypt(8), amrestore(8), gpg(1) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHOR
Kevin Till <kevin.till@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.3 01/10/2013 AMGPGCRYPT(8)
All times are GMT -4. The time now is 01:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy