BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
deleted_user
Not applicable
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
LinusH
Tourmaline | Level 20
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
deleted_user
Not applicable
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
deleted_user
Not applicable
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1242 views
  • 0 likes
  • 3 in conversation