View previous topic :: View next topic |
Author |
Message |
eunuque n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10547371303f436cbbb5545.gif)
Joined: 19 Aug 2003 Posts: 62
|
Posted: Fri Feb 06, 2004 10:04 pm Post subject: scp strange behavior |
|
|
Hi all,
I'm using scp between a gentoo (192.168.0.1) and a redhat9 (192.168.0.10) boxes.
It's working only for transfers initiated by my gentoo box. Overwise scp aks for the password and then freezes.
Download from gentoo is fine:
Code: | toto@gentoo# scp toto@rh:test_file .
toto@192.168.0.10's password:
test_file 100% 0 0.0KB/s --:-- ET |
Upload from gentoo also:
Code: | toto@gentoo# scp test_file toto@rh:
toto@192.168.0.10's password:
test_file 100% 0 0.0KB/s --:-- ET |
But download/upload from rh freeze:
Code: | toto@rh: scp toto@gentoo:test_file .
toto@192.168.0.1's password |
... and then nothing !
Note that I made these tests after /etc/init.d/iptables stop to be sure it was not a firewall isssue.
Any help? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Janne Pikkarainen Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/10433783463f526aba4144d.jpg)
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Fri Feb 06, 2004 10:10 pm Post subject: |
|
|
Does your toto@gentoo account run some commands or print out some fancy motd during login? I mean, did you add something to its ~/.bashrc, ~/.zshrc or some file like that? _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eunuque n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/10547371303f436cbbb5545.gif)
Joined: 19 Aug 2003 Posts: 62
|
Posted: Sat Feb 07, 2004 11:11 am Post subject: |
|
|
Thanks!!!
The problem came from a change I made in my .bashrc:
Code: | # We restart the login shell one time because of french accents
if [ "$SHLVL" == '1' ]
then
exec /bin/bash --norc
fi |
I have absolutely no idea how scp interacts with the remote shell and in my case with .bashrc, but this made scp freeze...
I reinforced my test so that it also checks for $PS1 (which apparently is not defined during a scp command). I'm not really proud of this workaround but at least it now works:
Code: | # We restart the login shell one time because of french accents
if [ "$SHLVL" == '1' ] && [ "$PS1" != "" ]
then
exec /bin/bash --norc
fi
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Janne Pikkarainen Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/10433783463f526aba4144d.jpg)
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Sat Feb 07, 2004 11:19 am Post subject: |
|
|
Fantastic. Your workaround seems to be fine.
I also don't know what exactly makes scp break and what not, but after struggling with this issue by myself too, nowadays when scp fails the absolutely first thing I check is my login stuff. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|