DATA Step, Macro, Functions and more

encrypting password while using DOS FTP from SAS

Reply
N/A
Posts: 0

encrypting password while using DOS FTP from SAS

hi all,

If I use filename FTP , it is possible to use encrypted password (from proc pwencode);

But say, I would like to use DOS-FTP from a SAS session;, i.e have the SAS program create a text file which has traditional FTP instructions and then use X command to run the text file;

In this scenario, I am not able to find a way to encrypt password;

Any suggestions , ideas, how to use encrypted password in second case ?

thanks,
Shankar
Super Contributor
Super Contributor
Posts: 3,174

Re: encrypting password while using DOS FTP from SAS

Consider using .netrc file to supply such information, otherwise how would your encyrpted password get de-encrypted when passed to the FTP server?

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: encrypting password while using DOS FTP from SAS

hi Scott,

Thanks for reply..you gave a useful hint about netrc files..I looked up about netrc files, and this idea seems to offer protection in the sense that only right people with access can look at contents of netrc file;

However I am not sure if encrypted password is placed in netrc file, DOS-FTP would work;

Am I missing something here?

thanks,
Shankar
Super User
Posts: 5,260

Re: encrypting password while using DOS FTP from SAS

First of all, why can't you stick with filename ftp?
Second, I think would get more luck on a different forum than these ones at this site, since SAS has nothing to offer if you chose to perform the processing outside SAS (by using X statement).

Then it's not clear what you want to protect. A password in a scrip tfile can be protected by using file system security. You might also consider that ftp offers no proection during communication. In this case you could consider using the sftp protocol instead.

/Linus
Data never sleeps
N/A
Posts: 0

Re: encrypting password while using DOS FTP from SAS

hi Linus,

Thank you for your response;

I have been testing both filename FTP and DOS-FTP for some time now; And before moving code to production I want to be able to give pros and cons of both approaches to my management;

I found several limitations using standard filename FTP, however I was able to come up with a solution which would allow me to gracefully terminate system and make another attempt to download files, in case of various failures (network connection lost/remote file moved etc);

DOS-FTP never gave me any issues at all, but looks like the major draw back is it will not allow to encrypt password; The requirement at my client site is that the actual password should not be stored anywhere, even in netrc files, and it should not appear in log files either. And entering this password when prompted is not an option (the process is used to download dozens of files daily from Bloomberg server);

so basically, I have been thoroughly exploring all options..and I want to ready with an answer if someone from client team asks me reason not to use DOS-FTP;

thanks,
Shankar
N/A
Posts: 0

Re: encrypting password while using DOS FTP from SAS

To support encoding/encrypting a pw for "filename ftp", have you looked into PROC PWENCODE?
See example "Example 2: Using an Encoded Password in a SAS Program" at http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002598191.htm .


Good Luck

PeterC
Ask a Question
Discussion stats
  • 5 replies
  • 346 views
  • 0 likes
  • 3 in conversation