1827871 Members
2073 Online
109969 Solutions
New Discussion

Automate Crypt command

 
SOLVED
Go to solution

Automate Crypt command

Is it possible to automate the crypt command?
Basically I have a tar file that I want to encrypt before it is FTP to another machine.
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor
Solution

Re: Automate Crypt command

Hi Chris:

# echo "hello Chris" > myfile
# crypt jrfkey < myfile > myfile.enc

# cat myfile.enc
[...jibberish...]

# crypt jrfkey < myfile.enc
hello Chris

Regards!

...JRF...

Re: Automate Crypt command

Is it using a key to encrypt?
James R. Ferguson
Acclaimed Contributor

Re: Automate Crypt command

Hi (again) Chris:

> Is it using a key to encrypt?

Yes, in the example I showed, the key was "jrfkey".

Regards!

...JRF...

Re: Automate Crypt command

Sorry just one more question. Is this key generated on the fly (when the command is executed) where is the key stored? or is the key somehow embedded in the encryption of the file?

I am totally new to this..

Thanks
James R. Ferguson
Acclaimed Contributor

Re: Automate Crypt command

Hi (again) Chris:

> Sorry just one more question. Is this key generated on the fly (when the command is executed) where is the key stored? or is the key somehow embedded in the encryption of the file?

Isn't that two questions? :-)

The key is anything you choose to specify. It is not generated on-the-fly. Once encrypted, to read the file, you must supply (know) the key used to encrypt it.

No, the key isn't embedded in the file. The manpages for 'crypt(1)' offer more insight, and you should read them.

Regards!

...JRF...



James R. Ferguson
Acclaimed Contributor

Re: Automate Crypt command

Hi (again):

By the way, if/when you are satisfied with the answers you have received, please read:

http://forums.itrc.hp.com/service/forums/helptips.do?#28

Regards!

...JRF...

Re: Automate Crypt command

James thanks for your help. I just took a look at the man pages. They too were helpful.