Currently I'm trying to use sas to connect to sftp server. I did some researches, it said in order to use sftp method, I need to install openSSH client software and use key authentication for connection.
So I installed puTTY and setup the private/public key. When I test the connection from psftp, I can connect to sftp server without password (use key authentication). As you can see as below, the test file 3.xlsx is on the sftp server.
But the problem is when I try to get the same file on sas, it has an error "the file does not exist".
Inside psftp, I could download this test file on my local pc, I have no idea why I cant do the same thing on sas.
Below is my sas sftp connection code:
filename output sftp '/3.xlsx'
optionsx='-P 222 -i x:PuTTYprivatekey.ppk -pw "XXXXX" -V'
host="xxxxxx" user="xxxxxxx" path="x:PuTTYpsftp.exe" DEBUG;
I would be so appreciate if someone can help me to fix this issue.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…