do anyone no why i keep getting this error while using the ssh library
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello i am trying to transfer file from server to my local pc
i am not able to get a file the directory i am using is correct the file is correct everything is correct but i keep getting this error I am not sure what exactly am i doing incorrectly ?? please help thank you
if true {
ssh2_struct=ssh2_config('xxxxxx', 'xxxxxxx', 'xxxxxxxxx');
% SSH2_CONFIG creates a simple SSH2 connection with the
% specified hostname, username, and password
% SSH2_CONFIG(HOSTNAME,USERNAME,PASSWORD, [PORT])
% Configures a connection to the host, HOSTNAME with user USERNAME and
% password, PASSWORD. The returned SSH2_CONN can be used by SSH2_COMMAND
% or other SSH2 file transfer commands.
REMOTE_PATH='~/palm/current_version/JOBS/doubleturbineA1/MONITORING/' ;
REMOTE_FILENAME='doubleturbineA1_turbine_parameters02';
LOCAL_PATH='Home/Downloads/';
scp_get(ssh2_struct,REMOTE_FILENAME,LOCAL_PATH,REMOTE_PATH);
% REMOTEFILENAME can be either a single string, or a cell array of strings.
% If REMOTEFILENAME is a cell array, all files will be downloaded
% sequentially.
%
% OPTIONAL INPUTS:
% -----------------------------------------------------------------------
% LOCALPATH specifies the folder to download the remote file to.
% Otherwise the working directory is used.
% REMOTEPATH specifies a specific path on the remote host to look for the
% file to download. Otherwise, the default (home) folder is used.
ssh2_close(ssh2_struct);
% SSH2_CLOSE closes an existing SSH2 connection.
% This function can be used as the last SSH2 commmand
% because the connection won't be closed until the very end.
}end
if true
Error using ssh2_main (line 169)
Error Transferring File
SEE JAVA ERROR BELOW
Java exception occurred:
java.io.IOException: Error during SCP transfer.
at ch.ethz.ssh2.SCPClient.get(SCPClient.java:705)
at ch.ethz.ssh2.SCPClient.get(SCPClient.java:598)
Caused by: java.io.FileNotFoundException: Home/Downloads/doubleturbineA1_turbine_parameters02 (No such file or
directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at ch.ethz.ssh2.SCPClient.receiveFiles(SCPClient.java:346)
at ch.ethz.ssh2.SCPClient.get(SCPClient.java:701)
... 1 more
Error in ssh2 (line 84)
ssh2_struct = ssh2_main(ssh2_struct);
Error in scp (line 19)
ssh2_struct = ssh2(ssh2_struct);
Error in scp_get (line 50)
ssh2_struct = scp(ssh2_struct);
Error in getoutputdata (line 21)
scp_get(ssh2_struct,REMOTE_FILENAME,LOCAL_PATH,REMOTE_PATH);
>>
end
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB Compiler in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!