Bug 274

Summary: scp fails if target account has echo "somestuff" as last line in .profile
Product: Portable OpenSSH Reporter: tai <tai>
Component: scpAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED INVALID    
Severity: normal    
Priority: P2    
Version: -current   
Hardware: Other   
OS: Other   

Description tai 2002-06-13 01:34:59 AEST
Trying to scp from pscp (v 0.49) on windows and openssh 3.1p1 on linux 2.2.16 to
openssh 3.2.3p1 on linux 2.4.17.  Shell is /bin/bash.  If last line of .profile
in account echo's something 'echo "stuff"', scp fails.  Removing the echo line,
scp succeeds.  This bug does not exist if the target machine is running openbsd
2.9 with the native version of ssh.  Tried it with both /bin/sh and /bin/bash.

-Tai
Comment 1 Markus Friedl 2002-06-13 04:21:19 AEST
so your .profile is broken. you're not supposed to do this
for non-interactive session.
Comment 2 Jim Knoble 2002-06-13 08:12:28 AEST
It shouldn't matter if ~/.profile (or ~/.bash_profile) echos anything. That file
should only be read for a login session.  For scp, ~/.profile shouldn't be read,
and scp should go on happily with life.

Perhaps your setup reads ~/.profile from ~/.bashrc or ~/.kshrc?  If a non-login
session has shell startup files that print anything on stdout or stderr, then
you create problems for scp.
Comment 3 Kevin Steves 2002-07-18 16:07:48 AEST
can't put anything into RCP stream.
closing.
Comment 4 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED