Your browser does not allow storing cookies. We recommend enabling them.

Tectia

Debugging File Transfer

The return codes and error messages should be sufficient to explain most errors. Check that the code and message are correct by looking at the results:

  • Was the file transferred OK but the error code wrong?

  • Was the error code 0 but the file corrupted?

To diagnose file transfer problems, take a trace. If possible, also take a trace of a similar but successful run and compare the two traces. To get traces that can be compared with a diff command, use a trace format without "%Dx" or "%p" specifiers:

SSH_DEBUG_FMT=" %m/%s:%n:%f %M"

To trace the generic file transfer level, use the debug string 'sftp*=14'.

To trace the z/OS low level, use the debug string '*mvs*=7'.

To trace both, use 'sftp*=14|*mvs*=7'.

To get the trace for the client end, put the debug string on the command line, for example:

$ sftpg3 -D "sftp*=14" user1@www.example.com 

To get the trace for the server end when using sftpg3, use the debug command:

sftp> pwd
sftp> lpwd
sftp> debug 'sftp*=14|*mvs*=7
sftp> sput tmp.txt //TMP.TXT
sftp> debug 1

To get the trace for the server end when using scpg3, create, on the remote machine, the file $HOME/.ssh2/environment, and put in a line like this:

SSH_SFTP_DEBUG=sftp*=14

To make the debug at the server end go into a HFS file at the server, add this line in the $HOME/.ssh2/environment file:

SSH_SFTP_DEBUG_FILE=/tmp/my-debug.txt


 

 
Highlights from the SSH.COM blog:

  • Cryptomining with the SSH protocol: what big enterprises need to know about it

    Cryptomining malware is primarily thought of as targeting desktops and laptops and is used to hijack system resources to mine cryptocurrency.
    Read more
  • SLAM the door shut on traditional privileged access management

    Did you know that something as trivial-sounding as granting access for your developers or third parties to a product development environment can throw a gorilla-sized monkey wrench into your operations and productivity?
    Read more
  • We broke the IT security perimeter

    Everyone understands the concept of a security perimeter. You only gain access if you are identified and authorized to do so.
    Read more