« Return to Thread: Problem with scp and SSH on Arch Linux

Re: Problem with scp and SSH on Arch Linux

by Greg Wooledge :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View in Thread

On Thu, Jun 14, 2007 at 10:08:27PM +0200, Stijn Segers wrote:
> I tried to use scp today, and got this weird behaviour:
>
> [stijn@hephaistos ~]$ scp -2 .ssh/id_rsa-olympos2.pub \
> stijn@olympos:/home/stijn/.ssh/id_rsa-olympos2.pub
> Enter passphrase for key '/home/stijn/.ssh/id_rsa-olympos':
> Arch Linux (Duke) 2.6.21.4-cks-server
> [stijn@hephaistos ~]$

Your .bashrc (or analogous file for your login shell) on the remote
system is writing stuff to stdout.  You need to stop it from doing that.
If you still want it to do that when you open a regular interactive
shell (e.g. an xterm), then wrap all your output-producing commands in
a test, such as this:

if test -t 1; then
  uname ....
  stty ...
  echo ...
fi

The exact details will depend on just what you've got in the .bashrc.

 « Return to Thread: Problem with scp and SSH on Arch Linux