01-08-2007 02:26 AM
I'm trying to get an SFTP command to work in a VMS batch job. The command format is as follows:
$ SFTP -v "-B"
where "abc" is a valid user name and "xyz" is a valid node name.
Public key authentication is set on both nodes. The client node is an Itanium running OpenVMS 8.2. The server node is a Linux machine. This command works correctly when entered at an interactive DCL level, but fails when run as a VMS batch job (i.e., job submitted to a VMS batch queue.) The error being returned is:
Error: Could not read the batchfile.
The protection on the input file is
Any help would be appreciated. Thank you.
Solved! Go to Solution.
01-08-2007 04:25 AM
details, it's hard to tell if the
directory for the batch job, which might
easily be different from your interactive
default directory. If it's some relative
spec and the default directories are
different, the explanation could be pretty
What, exactly, are "
default device-directory specs?
01-08-2007 04:26 AM
I had seen this entry before. There doesn't seem to be any problem with authentication. The -v swith puts out verbose information and we can see from it that the client is successfully connecting to the server. The problem seems to be that when running as a batch job, the client (I think) cannot read the input file. Unfortunately, it doesn't put out any indication as to why it can't read the file.
01-08-2007 05:07 AM
Around here, I see only "Error: Could not
read the batchfile."
alp $ tcpip show version
HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 6
on a COMPAQ Professional Workstation XP1000 running OpenVMS V7.3-2
alp $ ssh "-V"
V5.5) 3.2.0 on COMPAQ Professional Workstation - VMS V7.3-2
On the other hand, I get some success if I
specify the batch file using a UNIX-like
syntax, "/SYS$SYSROOT/SYSMGR/FILEX.TXT" (or
However, if that file is not "Record format:
Stream_LF", then SFTP appears to try to
convert it (in place, more or less), and if
run by some peon without write permission to
that directory (or file?), it fails with
Warning: Converting file /sys$manager/filex.txt to Stream_LF.
openvms_specific/OPENVMS_SPECIFIC.C:1911: Error calling CONV$CONVERT for /sys$manager/filex.txt.
Status = %CONV-F-OPENOUT, error opening !AS as output
So, my advice is, "Think UNIX.", which
means: Start with a Stream_LF batch file, and
specify its location with a UNIX-like
syntax. For that matter, if you're
_sending_ any files, thay'd better look
UNIXy, too (Stream_LF or, perhaps,
fixed-512), if you expect them to look like
anything at the other end.