SCP -B not working (288 Views)
Occasional Visitor
Posts: 3
Registered: ‎01-24-2006
Message 1 of 8 (288 Views)

SCP -B not working

On our Alpha system VMS 7.3-2
I'm trying to run a SCP in a command procedure.
The command works great interactively.

When I try to run in the command procedure, I add the -B qualifier to the command line. The error message appears to be related to the -b qualifier. See below.
$ SCP2 -B m900oper.txt maxcim@sapcibwpo:
tcpip$ssh_scp2.exe: FATAL: -b requires an argument greater than zero.
%TCPIP-F-SSH_FATAL, non-specific fatal error condition
Please help.
Honored Contributor
Posts: 1,616
Registered: ‎10-29-2003
Message 2 of 8 (288 Views)

Re: SCP -B not working

I guess you had to quote the option, i.e.

$ SCP "-B" ...

because all quals are lowercased to be most compatible to unix, so to have an uppercase qualifier you need quotes.

regards Kalle
Occasional Visitor
Posts: 3
Registered: ‎01-24-2006
Message 3 of 8 (288 Views)

Re: SCP -B not working

Thanks for the advise. I tried the quotes already. See below.

If I need the quoates, any thoughts on this error?
$ SCP2 "-B" m900oper.txt maxcim@sapcibwpo:
tcpip$ssh_scp2.exe: warning: ssh2 client failed to authenticate. (or you have to
o old ssh2 installed, check with ssh2 "-V")
warning: Authentication failed.
Disconnected; protocol error (Too many authentication failures for maxcim).

tcpip$ssh_scp2.exe: warning: child process (/sys$system/tcpip$ssh_ssh2) exited w
ith code 27.
%TCPIP-E-SSH_FC_ERROR, undetermined error within sshfilecopy

Honored Contributor
Posts: 4,562
Registered: ‎12-10-2003
Message 4 of 8 (288 Views)

Re: SCP -B not working

Do as it says : add the "-V" option.

Honored Contributor
Posts: 4,536
Registered: ‎12-17-2003
Message 5 of 8 (288 Views)

Re: SCP -B not working


To begin with:
Welcome to the VMS forum!

if the target system is some form of Unix/Linux, then the username@nodename construct must also be in bouble quotes.



Have one on me.

Don't rust yours pelled jacker to fine doll missed aches.
Occasional Visitor
Posts: 3
Registered: ‎01-24-2006
Message 6 of 8 (288 Views)

Re: SCP -B not working

Adding quotes to the user@server gave me the same error as the quotes added to -B.

This may be a stupid question. Is there some configuration setting that needs to be set to allow file copies via batch mode? If so, can you provide an example of the command to set batch mode 'On'?

Thanks again, for all the help!
Honored Contributor
Posts: 341
Registered: ‎09-30-2005
Message 7 of 8 (288 Views)

Re: SCP -B not working

When you put "-B" on the line you forced it into batch mode as you desired. SSH (and hence SCP and SFTP) will not do password authentication when operating in batch mode. The client and the server looked at what other modes of authentication they both were configured to do, tried each of them, and they all failed, so it reported failure to authenticate.

Without looking at the configuration files for both the client and server we don't know what the authentication methods were (it could have been a null set).

Possible authentication methods are:
-publickey (without a passphrase, or with a passphrase and the passphrase loaded in a copy of SSH Agent that is currently running)
-Host Based

Both of these methods require some configuration by putting the right information is specific files and putting public key files on the remote system. Consult the documentation for the details.

Honored Contributor
Posts: 5,247
Registered: ‎04-26-2004
Message 8 of 8 (288 Views)

Re: SCP -B not working


I've recently answered a similar question for SFTP and provided setup instructions. Please see:

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.