Banner causes scp to fail from script but not command line.
Hi,
We have an interesting issue which is similar to the one in this thread, but that never provided a full answer. - Ohh apparently I can't post URLs till I have 5 posts, sorry.
We have a simple script that copies files from one shelf to the other. Both shelves have an ssh banner defined. When I run the script the scp to the remote shelf fails however if does not when the same command is run from the command line. When I pipe the output to a file, the error output displays the banner from the remote shelf.
Piping the error output to a file solves the problem and the scp works fine, however I don't understand why and I was wondering if anyone could explain. We have quite a few places in the code where the output is not currently piped to /dev/null (stderr) and I really want to understand the cause of the problem so that I know whether I need to correct all of them or just ones in certain formats/shells or indeed if it is a config problem?
The code I am running is as follows (I have removed any parts that could be company sensitive (e.g. <remote shelf ip> if not the actual code in this line but does work):
When I run the scp with the -v option, this is the output I get (fjmfjf is the remote shelf banner - a pretty rubbish banner I'll admit, it has been like that for years though):
If anyone could through some light on why this is happening it would be greatly appreciated. From my google investigations, I think it is something to do with the banner text being incorporated into the ssh command but that's about it.
Hey all,
I want to use the banner/echo command to write messages on different console windows.
I knew that before, but I completely forget how to do it ! I just remenber that /dev/pts/# is the number of the window. and it's useful.
It would be great if someone knows how to solve my... (4 Replies)
hi,
When i execute banner command the output is being displayed as
banner:command not found
When ever i give yum install banner the output is
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Parsing package install arguments
Nothing to do
what... (8 Replies)
hello,
I am using banner command in my shell.I used :-
The problem is that the output is printed in 3 separate lines.I want to display it in a single line.If the size is not enough then at least 2 words should come in the same line. Can you tell me what is the option in banner that would help... (4 Replies)
Iam a MCA student having some doubts about
1) different disk related commands
2) Banner command
3) Different file related commands
4) set eb (where it is used) (1 Reply)
Hi,
I am logging in into an UNIX environment with my user id and password.
I want to display my name there , each time I login into the environment,
for which I can use the banner command.
Which file should I add the banner command to , so that I will get the desired result?
Regards,... (7 Replies)
Hi,
I has the following command in the script. This command works fine if I execute on command prompt. If I run the script, this is not working as expected (deleting CR).
tr -d "\015" < ${FilePath}/${FileName} > ${FilePath}/${File_Prefix}.csv
I could not figure out whats... (6 Replies)
:wall:
Is there a way to prevent the banner from displaying from the remote host when using scp? I see from the man pages that the '-o' option passes args to ssh and I've tried several variations of:
scp -o "-q" file remotehost:
Anybody got this to work?
Thanks in Advance (3 Replies)
Hi guys can i get banner equivalent command in linux.
I am using
Linux xcclx0619.target.com 2.6.18-308.11.1.el5xen #1 SMP Fri Jun 15 16:19:17 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux (1 Reply)