On Tue, 20 Jan 2009 16:20:35 -0800, Kevin wrote:
> I need to transfer files between two servers on a regular basis (as a
> cron job)
>
> I got ssh to work, but scp kept failing. After troubleshooting, I
> figured out that the reason was due to output being thrown by the
> .bashrc on the remote server. Now, I cannot modify the remote file
> output ; so what option do I have ? Can I somehow prevent the login
> script from executing ?
>
> If rsync is an option I am okay with that as well, but I ran into the
> same issue with rsync as well
>
> -Kevin.
You should be able to work around this a bit by "proper use" of the
config files -- essentially, put noisy stuff into .bash_profile, and per-
shell initialization stuff in .bashrc.
From "man bash" (FILES section)
.bashrc
the individual per-interactive-shell startup file
.bash_profile
the personal initialization file, executed for login shells
the stuff sending the output (obviously only good for human logins) can
be moved to the .bash_profile.
(I ran into this some years ago with csh....)
rsync won't help (I think) -- since it really only calls scp underneath
the wraps....