[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scp does not copy, no error msg, ssh works



On Wed, Apr 27, 2005 at 01:44:06PM +0200, Marc Mueller wrote:
> >debug1: Sending command: scp -v -t .
> >Linux kiste 2.4.26-1-k7 #1 Tue Aug 24 14:08:24 JST 2004 i686 GNU/Linux
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> scp gets confused if there is any output from the target. Check from 
> where this line is generated (.bashrc?) and comment it out.


On Wed, Apr 27, 2005 at 05:27:35PM +0100, michael wrote:
> On Wed, 2005-04-27 at 09:54 -0600, Monique Y. Mudama wrote:
> > On 2005-04-27, Ulrich Scholz penned:
> > > Thank you, that solved the problem!
> > >
> > > It took me quite a while to eliminate the output but without, it
> > > works!
> > >
> > > But why is that a problem?  
> > >
> > >
> > > Thanks to all of you,
> > >
> > > Uli
> > 
> > I'm sure I'm not the only person out here wondering which suggestion
> > solved the problem.  Unfortunately, since you didn't quote the person
> > who made the suggestion, we have no idea.
> 
> (It wasn't my suggestions that helped so I'll make amends:)
> 
> I believe it the solution was "if scp gets any string back from the
> remote host when the connection is authorized then  you will get
> unpredicted results such as no file copied and no warnings"


In case the OP really wanted to have something like "Linux kiste ..."
be printed when logging in, he could simply put it in the shell startup
file that's being sourced for _login_ shells only.  In that case, scp
wouldn't have a problem.

Most shells have two kinds of startup files.  One of them is being
sourced on every interactive invocation of the shell.  The other one
only when it's a login shell.  For bash, the former is ~/.bashrc, and
the latter is one of ~/.bash_profile, ~/.bash_login, ~/.profile  (or
the respective system-wide variant).
See bash(1), section INVOCATION for full details.

Almut



Reply to: