All
I am a VMS guy just learning UNIX.
My first task is to SFTP files from VMS to UNIX in BATCHMODE without having to enter a password. Note that using SFTP interactively works just fine.
I have followed some specific instructions provided by a vendor with no success. I have also read about a dozen SFTP/SSH2/SSH/SCP related articles online trying to accomplish this goal with no success.
The following are the steps I have performed so far:
#1 VMS SIDE
MULTINET SSHKEYGEN/SSH2
this creates 2 files id_dsa_1024_a and id_dsa_1024_a.pub
#2 VMS SIDE
create file IDENTIFICATION that contains
ideky id_dsa_1024_a
#3 VMS SIDE
create test.com contains the following:
open
myid@10.111.55.55
ascii
put test.dat
exit
#4 VMS SIDE
mu scp2 id_dsa_1024_a.pub myid@10.
111.55.55::/home/myid/ssh2/id_dsa_1024_a.pub
#5 UNIX SIDE
using VI editor created a file called AUTHORIZATION
it contains
key id_dsa_1024_a.pub
#6 VMS SIDE
SFTP/BATCH=TEST.COM
The following are the results with /VERBOSE QUALIFIER
RLH: sftp/batch=test.com /verbose
(13:21:05)SshFileCopy/SSHFILECOPY.C;1:720: Making local connection.
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `SRI_ON_ODS5@PROCESS.COM', data:
00000000: 4641 4c53 45 FALSE
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `OVMS@PROCESS.COM', data:
00000000: 312e 32 1.2
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `newline', data:
00000000: 0d0a ..
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `vendor-id', data:
00000000: 0000 000b 5052 4f43 4553 532e 434f 4d00 ....PROCESS.COM.
00000010: 0000 084d 756c 7469 4e65 7400 0000 0456 ...MultiNet....V
00000020: 352e 32e4 bc2b e000 a826 ba 5.2ä¼+à.¤&º
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `supported2', data:
00000000: 8000 01ff 0000 0000 0000 007f 0000 0000 ................
00000010: 0000 7e00 0000 0000 0000 0000 0000 000e ..~.............
00000020: 0000 0017 6f70 656e 5f72 6563 6f72 6440 ....open_record@
00000030: 7072 6f63 6573 732e 636f 6d00 0000 1841 process.com....A
00000040: 4c4c 5f56 4552 5349 4f4e 5340 5052 4f43 LL_VERSIONS@PROC
00000050: 4553 532e 434f 4d00 0000 1647 4554 4456 ESS.COM....GETDV
00000060: 495f 4f44 5340 5052 4f43 4553 532e 434f I_ODS@PROCESS.CO
00000070: 4d00 0000 1753 5249 5f4f 4e5f 4f44 5335 M....SRI_ON_ODS5
00000080: 4050 524f 4345 5353 2e43 4f4d 0000 0012 @PROCESS.COM....
00000090: 4249 4e41 5259 4050 524f 4345 5353 2e43 BINARY@PROCESS.C
000000a0: 4f4d 0000 0019 5452 414e 534c 4154 455f OM....TRANSLATE_
000000b0: 564d 5340 5052 4f43 4553 532e 434f 4d00 VMS@PROCESS.COM.
000000c0: 0000 104f 564d 5340 5052 4f43 4553 532e ...OVMS@PROCESS.
000000d0: 434f 4d00 0000 0976 656e 646f 722d 6964 COM....vendor-id
000000e0: 0000 000e 7665 7273 696f 6e2d 7365 6c65 ....version-sele
000000f0: 6374 0000 000f 7370 6163 652d 6176 6169 ct....space-avai
00000100: 6c61 626c 6500 0000 0974 6578 742d 7365 lable....text-se
00000110: 656b 0000 001b 6669 6c65 2d63 6f6e 7465 ek....file-conte
00000120: 6e74 2d68 6173 682d 3140 7373 682e 636f nt-hash-1@ssh.co
00000130: 6d00 0000 0f6d 6435 2d68 6173 682d 6861 m....md5-hash-ha
00000140: 6e64 6c65 0000 0008 6d64 352d 6861 7368 ndle....md5-hash
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `versions', data:
00000000: 322c 332c 34 2,3,4
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `OVMS@PROCESS.COM', data:
00000000: 312e 32 1.2
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2068: ext_name `TRANSLATE_VMS@PROCESS.COM', data:
00000000: 37 7
(13:21:05)SshFileXferClient/SSHFILEXFERC.C;1:2110: Negotiated version: 4 (own version: 4, remote version: 4).
(13:21:05)SshFileCopy/SSHFILECOPY.C;1:651: Connection to local, ready to serve requests.
(13:21:05)Sftp2/SFTP2.C;1:601: Connection ready.
sftp> open myid@10.111.55.55
(13:21:05)Sftp2/SFTP2.C;1:993: Got token: `open'
(13:21:05)Sftp2/SFTP2.C;1:980: Tokens array size = 2.
(13:21:05)Sftp2/SFTP2.C;1:993: Got token: `myid@10.111.55.55'
(13:21:05)Sftp2/SFTP2.C;1:1137: Number of tokens: 2.
(13:21:05)Sftp2/SFTP2.C;1:1173: Command descriptor 0x200e (0xe)
Opening connection to myid@10.111.55.55
(13:21:05)SshFileCopy/SSHFILECOPY.C;1:741: Connecting to remote host. (host = myid@10.111.55.55, user = NULL, port = NULL)
argv[0] = mult ssh2
argv[1] = myid@10.111.55.55
argv[2] = -v
argv[3] = -x
argv[4] = -a
argv[5] = -o
argv[6] = "passwordprompt %U@%H's password: "
argv[7] = -o
argv[8] = "nodelay yes"
argv[9] = -o
argv[10] = "authenticationnotify yes"
argv[11] = -o
argv[12] = "BatchMode yes"
argv[13] = -o
argv[14] = "ssh1compatibility no"
argv[15] = -s
argv[16] = "sftp"
(13:21:05)SshSigChld/SSHSIGCHLD.C;1:342: Registering handler for pid 0.
(13:21:05)SshUnixPipeStream/SSHUNIXPIPESTREAM.C;3:344: mult ssh2 "-s" "sftp" dummy
(13:21:05)SshSigChld/SSHSIGCHLD.C;1:342: Registering handler for pid 539338481.
debug: Connecting to 10.111.55.55, port 22... (SOCKS not used)
debug: (13:21:05)Ssh2Transport/TRCOMMON.C;1:3910: My version: SSH-2.0-ReflectionForSecureIT_6.1.0.16 - Process Software MultiNet
debug: client supports 5 auth methods: 'kerberos-tgt-2@ssh.com,kerberos-2@ssh.com,publickey,keyboard-interactive,password'
debug: (13:21:05)Ssh2Common/SSHCOMMON.C;1:503: local ip = 10.123.223.105, local port = 4500
debug: (13:21:05)Ssh2Common/SSHCOMMON.C;1:505: remote ip = 10.111.55.55, remote port = 22
debug: (13:21:05)SshConnection/SSHCONN.C;1:1975: Wrapping...
debug: Remote version: SSH-2.0-Sun_SSH_1.1.1
debug: Sun_SSH: Major: 1 Minor: 1 Revision: 1
debug: (13:21:05)Ssh2Transport/TRCOMMON.C;1:1478: lang s to c: `en-CA,en-US,es-MX,es,fr,fr-CA,i-default', lang c to s: `en-CA,en-US,
es-MX,es,fr,fr-CA,i-default'
debug: (13:21:05)Ssh2Transport/TRCOMMON.C;1:1543: c_to_s: cipher aes128-ctr, mac hmac-sha1, compression none
debug: (13:21:05)Ssh2Transport/TRCOMMON.C;1:1546: s_to_c: cipher aes128-ctr, mac hmac-sha1, compression none
debug: Remote host key found from database.
debug: (13:21:05)Ssh2Common/SSHCOMMON.C;1:313: Received SSH_CROSS_STARTUP packet from connection protocol.
debug: (13:21:05)Ssh2Common/SSHCOMMON.C;1:363: Received SSH_CROSS_ALGORITHMS packet from connection protocol.
*******************************************************************************
* *
* This is a private computer system containing confidential information. *
* Any unauthorized attempt to access or use this computer system or any *
* information on it by employees or other persons may result in termination *
* of employment, civil fines, and criminal penalties. This system must be *
* used for authorized business purposes only. *
* *
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive'.
debug: (13:21:05)Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C;1:1530: Starting pubkey auth...
debug: (13:21:05)Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C;1:1487: Agent is not running.
debug: (13:21:05)Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C;1:1336: Got 0 keys from the agent.
debug: (13:21:05)Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C;1:1423: adding keyfile "USERDISK2:[HOUSE_RX.SSH2]local_id_dsa_1024_a" to candid
ates
debug: (13:21:05)Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C;1:1316: Trying 1 key candidates.
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive'.
debug: (13:21:05)Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C;1:784: All keys declined by server, disabling method.
debug: (13:21:05)Ssh2AuthClient/SSHAUTHC.C;1:332: Method 'publickey' disabled.
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive'.
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:338: Starting kbd-int auth...
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:181: In Batchmode, so we're not asking the user anything. (p
rompt: Password: )
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:238: Sending response packet.
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive'.
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:338: Starting kbd-int auth...
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:181: In Batchmode, so we're not asking the user anything. (p
rompt: Password: )
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:238: Sending response packet.
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive'.
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:338: Starting kbd-int auth...
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:181: In Batchmode, so we're not asking the user anything. (p
rompt: Password: )
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:238: Sending response packet.
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive'.
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:338: Starting kbd-int auth...
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:181: In Batchmode, so we're not asking the user anything. (p
rompt: Password: )
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:238: Sending response packet.
debug: server offers auth methods 'gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive'.
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:338: Starting kbd-int auth...
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:181: In Batchmode, so we're not asking the user anything. (p
rompt: Password: )
debug: (13:21:05)Ssh2AuthKbdInteractiveClient/AUTHC-KBD-INTERACTIVE.C;1:238: Sending response packet.
debug: (13:21:05)Ssh2Common/SSHCOMMON.C;1:102: DISCONNECT received: Too many authentication failures for myid
warning: Authentication failed.
Disconnected; protocol error (Too many authentication failures for myid).
debug: (13:21:05)Ssh2Common/SSHCOMMON.C;1:592: Destroying SshCommon object.
debug: (13:21:05)SshConnection/SSHCONN.C;1:2027: Destroying SshConn object.
(13:21:05)SshUnixPipeStream/SSHUNIXPIPESTREAM.C;3:105: SSH process exited with status 1
(13:21:05)SshUnixPipeStream/SSHUNIXPIPESTREAM.C;3:119: Raising SIGCHLD
(13:21:05)SshUnixPipeStream/SSHUNIXPIPESTREAM.C;3:96: dead child pid is 2025a6f1
(13:21:05)SshSigChld/SSHSIGCHLD.C;1:152: calling handler pid 539338481 code -1
Warning: child process (ssh_exe:ssh2.exe) exited with code -1.
(13:21:05)SshUnixPipeStream/SSHUNIXPIPESTREAM.C;3:138: killing child 2025a6f1
RLH: