- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Directing SFTP output to a file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 08:13 AM
тАО03-13-2009 08:13 AM
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1185836
I need to capture the output from the SFTP ls command to a file so I can search it.
When I do things the normal way:
$assign sys$output sftp.out
$sftp "-b" commands.dat user@node
$deassign sys$output
I get "Warning: Need basic cursor movement capablity, using vt100", and the output goes to the screen.
As soon as I use DEFINE/USER SYS$COMMAND NL:, either in the pipe command or issued separately before the sftp command, I get "FATAL: OpenVMS$tty_gettty() failed
%TCPIP-F-SSH_FATAL, non-specific fatal error condition"
Any idea why I'm getting the error, or any other way to redirect the output to a file?
Using '-o "batchmode yes"' gives me an illegal option error:
illegal option -- o
Usage: sftp2 [-D debug_level_spec] [-b batchfile] [-S path] [-h] [-V] [-P ssh2-port] host
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 09:52 AM
тАО03-13-2009 09:52 AM
Re: Directing SFTP output to a file
welcome to the ITRC OpenVMS forum!
Here is a code snippet from a working script on Alpha 7.3-2, TCPIP 5.4 ECO 7
$
$ !---- Using 'pipe' produces a decent log file for us.
$ pipe (define/user sys$command NL: ; -
sftp "-B" "/xxxx_de/workfiles/''sftp_cmdfile'" 'xxxxde_username'@'xxxxde_ip' ; -
define/job/nolog sftp_stat &$status) | copy sys$pipe: 'sftp_logfile'
$ sftp_status = f$trnlnm("sftp_stat")
Regards,
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 10:11 AM
тАО03-13-2009 10:11 AM
Re: Directing SFTP output to a file
The pipe command you have above is exactly what I tried. When I type the 'sftp_logfile' I get:
$ type sftp.out
FATAL: OpenVMS$tty_gettty() failed
%TCPIP-F-SSH_FATAL, non-specific fatal error condition
%NONAME-F-NOMSG, Message number 0764CFBC
One thing I notice is; it appears I have a different version of SFTP. Mine requires "-b" instead of "-B" and doesn't have a -o option. Not sure if that has anything to do with anything.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 10:14 AM
тАО03-13-2009 10:14 AM
Re: Directing SFTP output to a file
> illegal option error:
> [...]
Sometimes it's helpful to show the actual
command(s) used. Around here, no complaint:
alp $ sftp -o "batchmode yes"
sftp> quit
Disclosing some relevant software versions
might not hurt, either.
alp $ tcpip show version
HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 7
on a COMPAQ Professional Workstation XP1000 running OpenVMS V7.3-2
alp $ sftp "-V"
alp$dka0:[sys0.syscommon.][sysexe]tcpip$ssh_sftp2.exe: SSH Secure Shell OpenVMS
(V5.5) 3.2.0 on COMPAQ Professional Workstation - VMS V7.3-2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 10:28 AM
тАО03-13-2009 10:28 AM
Re: Directing SFTP output to a file
Thanks.
$ sftp -o "batchmode yes"
illegal option -- o
Usage: sftp2 [-D debug_level_spec] [-b batchfile] [-S path] [-h] [-V] [-P ssh2-p
ort] host
$ tcpip show version
HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 1
on a hp AlphaServer ES47 7/1000 running OpenVMS V7.3-2
$ sftp "-V"
dsa0:[sys0.syscommon.][sysexe]tcpip$ssh_sftp2.exe;1: SSH Secure Shell OpenVMS (V
1.0) 2.4.1 on hp AlphaServer ES47 7/1000 - VMS V7.3-2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 12:01 PM
тАО03-13-2009 12:01 PM
Re: Directing SFTP output to a file
Have a look at the release notes for ECO 7 for details of the later fixes.
ftp://ftp.itrc.hp.com/openvms_patches/alpha/V7.3-2/DEC-AXPVMS-TCPIP-V0504-15ECO7-1.txt
It is also vital that your batch file is in stream_lf format.
The option for batch mode is capital B, so needs to be in quotes, as mentioned in the notes.
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 12:10 PM
тАО03-13-2009 12:10 PM
Re: Directing SFTP output to a file
I'll say. Yikes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 06:25 PM
тАО03-13-2009 06:25 PM
Re: Directing SFTP output to a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2009 08:00 PM
тАО03-13-2009 08:00 PM
SolutionWhat do we need to do to upgrade?
<<<
Download
ftp://ftp.itrc.hp.com/openvms_patches/alpha/V7.3-2/DEC-AXPVMS-TCPIP-V0504-15ECO7-1.PCSI-DCX_AXPEXE
to the machine, RUN the file, and then PRODUCT INSTALL the resulting PCSI kit.
cu,
Martin