- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello to all, I have to transfer a file from the sas server to another via SFTP connection. My system administrator installed the private key on the server. I try to run the following code:
filename out sftp "SPM_KPI_HSEQALL_MAY2023.csv" host='XXXXXXX' debug
cd='01_IMPORTED_KPI' user='XXXXX' optionsx='-i /home/risorse/asea007/.ssh/SPM_PVTK.ppk -pw "XXXXXX"';
data _null_;
infile "/sasgrid/hseq/1_0/SPM_KPI_HSEQALL_MAY2023.csv" recfm=n ;
input x $char1. @@;
file out recfm=s;
put x $char1. @@;
run;
Can you help me figure out if there’s something wrong with the code?
Thank you
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi resolved, there was a problem with key authoritazion.
the correct code:
filename out sftp "SPM_KPI_HSEQALL_MAY2023.csv" host='XXXXXXXXX' debug
cd='01_IMPORTED_KPI' user='XXXXXXXXX' optionsx='-i /home/aaa/.ssh/SPM_PVTK.ppk';
data _null_;
infile "/sasgrid/hseq/1_0/SPM_KPI_HSEQALL_MAY2023.csv" recfm=n ;
input x $char1. @@;
file out recfm=s;
put x $char1. @@;
run;
Than you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
And the text of the actual error is?
Need to see the actual error message(s). You may need to provide the log of the entire code as things with libnames that aren't reported as errors sometimes make them unusable for specific tasks.
@dipand wrote:
Hello to all, I have to transfer a file from the sas server to another via SFTP connection. My system administrator installed the private key on the server. I try to run the following code:
filename out sftp "SPM_KPI_HSEQALL_MAY2023.csv" host='XXXXXXX' debug
cd='01_IMPORTED_KPI' user='XXXXX' optionsx='-i /home/risorse/asea007/.ssh/SPM_PVTK.ppk -pw "XXXXXX"';data _null_;
infile "/sasgrid/hseq/1_0/SPM_KPI_HSEQALL_MAY2023.csv" recfm=n ;
input x $char1. @@;
file out recfm=s;
put x $char1. @@;
run;
Can you help me figure out if there’s something wrong with the code?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
the error is :
The folder or file doesn't exist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If I delete the options -pw because my SAS administrator has installed the key on server , the error that I recieve is:
Error:
Couldn't read packet: Connection reset by peer
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi resolved, there was a problem with key authoritazion.
the correct code:
filename out sftp "SPM_KPI_HSEQALL_MAY2023.csv" host='XXXXXXXXX' debug
cd='01_IMPORTED_KPI' user='XXXXXXXXX' optionsx='-i /home/aaa/.ssh/SPM_PVTK.ppk';
data _null_;
infile "/sasgrid/hseq/1_0/SPM_KPI_HSEQALL_MAY2023.csv" recfm=n ;
input x $char1. @@;
file out recfm=s;
put x $char1. @@;
run;
Than you