Sponsored Content
Top Forums Shell Programming and Scripting Removing banners from scp calls (AIX/KSH) Post 302325966 by cpare on Tuesday 16th of June 2009 03:46:33 PM
Old 06-16-2009
When I do the following line in the shell by hand it runs just fine, but shows the banner
Code:
scp -p /foo/bar/some.ini server2:/foo/bar

When I try
Code:
scp -p /foo/bar/some.ini server2:/foo/bar |grep some.ini

I only see the banner, not the result line I am actually interested in.
When I try
Code:
grep some.ini `scp -p /foo/bar/some.ini server2:/foo/bar`

it shows the banner, and then appears to wait for input (I have been escaping out).
When I try
Code:
scp -p /foo/bar/some.ini server2:/foo/bar |grep -v some.ini

I only see the banner, not the result line I am actually interested in (seems to be the same as without -v).

Could it be because this data isn't coming back through stdout? I found this for debian - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=134589

Last edited by cpare; 06-16-2009 at 04:54 PM..
 

10 More Discussions You Might Find Interesting

1. AIX

Problems with scp in AIX-5.2

I am using ssh version OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.6l When i ssh to this server its working fine ,sftp is also fine ,but when i use scp to copy files to it i am prompted for the password and on entering it throws up the following error stty: tcgetattr: A... (1 Reply)
Discussion started by: arnab
1 Replies

2. IP Networking

Identification of data calls & voice calls

Is there any facility to filter/identify the data calls and voice calls coming throug modem? OR Can we get the data or voice calls information through a script(preferably C Kermit)? (0 Replies)
Discussion started by: pcsaji
0 Replies

3. AIX

AIX intercepting system calls

hi, How to intercept existing system calls by kernel extensions on AIX? (2 Replies)
Discussion started by: ramkumar.pvs
2 Replies

4. HP-UX

SCP HP-UNIX to IBX-AIX

Hi, I want to use SCP to transfer files from HP - UNIX to IBM AIX I have generated keys using ssh-keygen -t rsa on the UNIX box. I have copied the public key to the AIX box to the HOME_DIR of the user /.ssh/ authorized_keys When i try to use SCP it is still asking for a password.... (2 Replies)
Discussion started by: vijaykrc
2 Replies

5. AIX

SCP from UNIX to AIX

Hi, I want to use SCP to transfer files from HP - UNIX to IBM AIX I have generated keys using ssh-keygen -t rsa on the UNIX box. I have copied the public key to the AIX box to the HOME_DIR of the user /.ssh/ authorized_keys When i try to use SCP it is still asking for a password.... (8 Replies)
Discussion started by: vijaykrc
8 Replies

6. AIX

ssh and scp in aix 4.3.3

I'm using scp to copy files to another company via our 4.3.3 server. I am having transfer problems right at the transfer point in scp. Below are 2 debug outputs showing the bottleneck. The lower level debug preceeds the higher level debug output. It just seems to stop and refuses to transfer... (0 Replies)
Discussion started by: oldogbert
0 Replies

7. Shell Programming and Scripting

Problem while scp if bashrc calls Perl script

A weird thing, happened today: When i do SCP from a remote server, file is not getting copied to here. Application Server: Here is where i work, and have a login. I have several tweaks in .bashrc, and along with all those, today i called a PERL script from bashrc. So when ever i do scp from a... (4 Replies)
Discussion started by: thegeek
4 Replies

8. Shell Programming and Scripting

scp list of files using FOR LOOP in ksh

hi i want to scp files from remote server B to my local server A... and i have a file containing list of all files to be scped from remote server B there is a passwordless connectivity set between remote server and my local server. need a ksh script.. with a for loop that goes through... (2 Replies)
Discussion started by: billpeter3010
2 Replies

9. Red Hat

TCP banners for httpd

Can this be done for httpd also? Reading the manul it does not mention httpd at all. Basically, what I want to do is disable the ability of the user to see what type of system the web server is on. Can I:- 1. Add /etc/banners/httpd file and add some text in here. 2. Edit hosts.allow to... (1 Reply)
Discussion started by: psychocandy
1 Replies

10. AIX

ASK | How to scp command AIX to windows

Hii Master, im will copy file/directory aix to windows with scp commandline, but some error below: Note: If ping to 172.16.0.250 reply and was connected, and was open/allow port 22 at windows server inbound In aix finish installing ssh in windows finish installing winscp my... (3 Replies)
Discussion started by: williamen
3 Replies
libtalloc_stealing(3)						      talloc						     libtalloc_stealing(3)

NAME
libtalloc_stealing - Chapter 2: Stealing a context Stealing a context Talloc has the ability to change the parent of a talloc context to another one. This operation is commonly referred to as stealing and it is one of the most important actions performed with talloc contexts. Stealing a context is necessary if we want the pointer to outlive the context it is created on. This has many possible use cases, for instance stealing a result of a database search to an in-memory cache context, changing the parent of a field of a generic structure to a more specific one or vice-versa. The most common scenario, at least in Samba, is to steal output data from a function-specific context to the output context given as an argument of that function. struct foo { char *a1; char *a2; char *a3; }; struct bar { char *wurst; struct foo *foo; }; struct foo *foo = talloc_zero(ctx, struct foo); foo->a1 = talloc_strdup(foo, "a1"); foo->a2 = talloc_strdup(foo, "a2"); foo->a3 = talloc_strdup(foo, "a3"); struct bar *bar = talloc_zero(NULL, struct bar); /* change parent of foo from ctx to bar */ bar->foo = talloc_steal(bar, foo); /* or do the same but assign foo = NULL */ bar->foo = talloc_move(bar, &foo); The talloc_move() function is similar to the talloc_steal() function but additionally sets the source pointer to NULL. In general, the source pointer itself is not changed (it only replaces the parent in the meta data). But the common usage is that the result is assigned to another variable, thus further accessing the pointer from the original variable should be avoided unless it is necessary. In this case talloc_move() is the preferred way of stealing a context. Additionally sets the source pointer to NULL, thus.protects the pointer from being accidentally freed and accessed using the old variable after its parent has been changed. Version 2.0 Tue Jun 17 2014 libtalloc_stealing(3)
All times are GMT -4. The time now is 03:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy