scp problem

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Sun Jul 26 14:14:02 UTC 2009


bob 295 wrote:
> He's the exact sequence that I tried with this accompanying debug file.
> 
> i) I brought up both Mepis boxes.
> 
> box1 - 192.168.1.101 (as determined by running ifconfig)
> box2 - 192.168.1.103
> 
> The .bashrc on box1 contains a line at the end which says:
> 
> echo "hi bob from box 1"
> 
> ii) since ssh is not running by default I su root and type
> 
> /etc/init.d/ssh start
> 
> on box 1
> 
> iii) on box 2 I verified that ssh was in fact open by typing
> 
> 	ssh 192.168.1.101
> 
> and logging in to see the echo prompt above.
> 
> I then typed 
> 
> 	exit
> 
> to come back to the box2 console.
> 
> iv) still on box 2 I went to /tmp and ran
> 
> date > bob1
> 
> to create a file called bob1
> 
> v) I then typed
> 
> scp -v  bob1 192.168.1.101:/tmp/   1>junk 2>&1
> 
> to get the debug file attached.
> 
> No file named bob1 appears in /tmp on box1,  however,  even though I get 
> prompted for the box1 password and see the .bashrc echo line from box1 on my 
> screen.
> 
> Thanks once again in advance for any help you can offer.

Add this to your .bashrc: [ -z "$PS1" ] && return

That or remove the echo statement. Tools like scp, sftp, rsync over ssh 
etc. rely on having sane output from the remote shell (nothing custom), 
see http://www.openssh.com/faq.html#2.9 for more.

Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list