1752790 Members
5862 Online
108789 Solutions
New Discussion юеВ

SCP -B not working

 
Edward Hafner
New Member

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.
7 REPLIES 7
Karl Rohwedder
Honored Contributor

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
Edward Hafner
New Member

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
---------------------------

Wim Van den Wyngaert
Honored Contributor

Re: SCP -B not working

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

Wim
Wim
Jan van den Ende
Honored Contributor

Re: SCP -B not working

Edward,

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.

hth,

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Edward Hafner
New Member

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!
Richard Whalen
Honored Contributor

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.

Volker Halle
Honored Contributor

Re: SCP -B not working

Edward,

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

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=985928

Volker.