ssh/scp + .bashrc problem

Hi .... I get the next problem:

In my .bashrc I put the line

fortune -s | cowsay -f tux

at botton of file.... the I get

_________________________________________
/ What good is a ticket to the good life,
if you can't find the entrance? /
-----------------------------------------
.--.
|o_o |
|:_/ |
//
(| | )
/'_ _/`
___)=(___/

for every logon that I do..... Th eproblem is when I do a scp mymachone.mihome.org:/file.ext . I get only this

Re: ssh/scp + .bashrc problem

Are you sure scp reads .bashrc? I read the manpage of scp and there's nothing in it about .bashrc. It seems strange to me that scp would read the file, since scp justs securely copies a file, it doesn't open a shell.

A bus station is where a bus stops. A train station is where a train stops. On my desk I have a workstation.

Re: ssh/scp + .bashrc problem

FUBAR wrote:

Are you sure scp reads .bashrc? I read the manpage of scp and there's nothing in it about .bashrc. It seems strange to me that scp would read the file, since scp justs securely copies a file, it doesn't open a shell.

I'm not sure what exactly read the scp, but when I remove that line (fortune one) I have no problem at all

Re: ssh/scp + .bashrc problem

Hello,

I have had this in the past. On one system I was unable to scp with id files because the text returned upon login screws up the login somehow. This is really a problem with winscp right now. scp does read the default shell login. Just put a condition around the offending line and then it woint try to display the fortune for a scp session.