QSH CMD(pwd)Command ended normally with exit status 0.
QSH CMD('cd /fred')Command ended normally with exit status 1.
I have changed the command as suggested and while I am now getting a logI
am not getting the desired information.such
Using the following command;
scp '-i /home/sftpuser/.ssh/id_rsa'
Provides this output.
************Beginning of data**************
Warning: Identity file /home/sftpuser/.ssh/id_rsa not accessible: No
file or directory.a
************End of Data********************
And the file is successfully received.
I can use -v or -vv or -vvv and the verbosity of the log increases with
What I want to achieve is to know;
Was the file retrieved successfully
If not -
a) Does the file to be retrieved exist ?
b) Was there a communication or authentication error
c) Something else
Even with verbose logging there is no error as such in the log if I use
file name that does not existhttp://superuser.com/questions/134901/whats-the-difference-between-scp-and-sftp
The following line is received if the transfer is successful
Sink: C0755 389 CCL-T-20150902.csv
The exit status is always 0 regardless if the file is found and
transferred, or the file is not found or if the communication connection
There can be times when the file to be retrieved does not exist and this
can be quite valid but at this stage I am unable to confirm this in any
logging I have been able to obtain from the process.
Does anyone have any suggestions ?
From: Justin Dearing <zippy1981@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 02/09/2015 05:09 AM
Subject: Re: Verbose logging when using scp
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
I have read I am now more confused if I should be using SCP or SFTP.
I am using SCP as there is only a single file to be transferred at a
time and therefore saw no need to create a script file
scp and sftp are equally secure. The sftp client is intended for
interactive use. scp is better for your purposes. See this supersuer
You probably want to add -C to compress the stream and speed things up.
Having the remote user zip the csv and you unzipping it would reduce the
Kevin is correct that -v is as verbose as scp and sftp both get. You
need to pipe the output to a file. However, -v is probably more verbosethe
than you want, and you probable want to omit it unless you care about
intricacies of the ssh session. Omitting the -v will get you file notYou
and public/private key wrong error messages.
However, some of those error messages will go to stderr and not stdout
Probably want to use &> instead of > . That will definitely work withbash
in PASE, I'm not sure about the default ksh shell.
This page is good reading on I/O redirection in unix