You are not logged in.

#1 2004-12-14 16:14:41

CarLost
Member
From: Chile
Registered: 2004-12-08
Posts: 35
Website

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

 _________________________________________ 

that is the first line on the imagen of tux

There're a way to do an eficient scp whitout loss the nice login???

Offline

#2 2004-12-14 16:19:46

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

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.

Offline

#3 2004-12-14 16:23:00

CarLost
Member
From: Chile
Registered: 2004-12-08
Posts: 35
Website

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

Offline

#4 2004-12-14 17:33:25

Winkie
Member
Registered: 2004-09-30
Posts: 59

Re: ssh/scp + .bashrc problem

Show me your scp command line? I suppose this is possible, but odd.

Offline

#5 2004-12-14 17:42:58

CarLost
Member
From: Chile
Registered: 2004-12-08
Posts: 35
Website

Re: ssh/scp + .bashrc problem

Winkie wrote:

Show me your scp command line? I suppose this is possible, but odd.

I'll put both bashrc and scp command

.basrc

alias ls='ls --color=auto'
alias ll='ls -lh'
alias la='ls -a'
alias H='history | grep'
alias v='netstat -pan |grep LIST | grep ^tcp'
alias vv='netstat -pan |grep STABL'
amixer set Master 100 unmute > /dev/null
amixer set PCM 100 unmute > /dev/null
#PS1='[u@h W]$ '
#PS1='[`date +'%H:%M'`][[33[01;31m]u[33[00m]@h W]$ '
PS1='[`date +'%H:%M'`][[33[01;31m]u[33[37m]@[33[01;34m]h[33[32m] w[33[00m]]$ '

fortune -s | cowsay -f tux      #remove if scp problem

scp command

scp -r machine.homelinux.home:/root/Docs/Fondos/ fondos/ 

Offline

#6 2004-12-14 18:50:41

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

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.

if ($?prompt) then
  fortune -s | cowsay -f tux
endif

..or maybe:

 if [ "$PS1" ]; then
 fortune -s | cowsay -f tux
fi

Offline

#7 2004-12-14 20:42:41

CarLost
Member
From: Chile
Registered: 2004-12-08
Posts: 35
Website

Re: ssh/scp + .bashrc problem

colnago wrote:

[/code]
..or maybe:
[code] if [ "$PS1" ]; then
fortune -s | cowsay -f tux
fi
[/code]


Realy thanks colnago...... U save my SCPs  ;-)     :wq

Offline

Board footer

Powered by FluxBB