View previous topic :: View next topic |
Author |
Message |
heathkit n00b
Joined: 23 Apr 2002 Posts: 38
|
Posted: Tue Sep 10, 2002 1:55 am Post subject: Keychain breaks scp |
|
|
I put keychain in my .bashrc file. Now, I see that sometimes scp craps out on me. The command authenticates me, then I see keychain come up and it doesn't do anything else. Any idea what's going on? I comment keychain out of the .bashrc and scp works just fine. |
|
Back to top |
|
|
arcterex Tux's lil' helper
Joined: 30 Sep 2002 Posts: 109
|
Posted: Thu Oct 10, 2002 9:31 pm Post subject: Wierdness in .bash* files |
|
|
The solution that I found for this was to move the keychain command out of .bashrc and into my .bash_profile, and then to make sure that it's run in my terminals (I only use gnome-terminal) I changed the command that gnome-terminal runs to /bin/bash --login (in edit->current profile->title and command->run custom command).
Works for me, not the most elegant solution, but it works....
Update
I know there's a way to do it better, but after a bit of mucking about I found that when scping from another box, $PS2 is not set ($PS1 is), and when invoking /bin/bash (ie: not changing gnome-terminal as above) $PS2 is set.
Anyway, I put the following in my .bashrc, and left my .bash_profile as default, and it works. YMMV of course.
Code: | if [ "$PS2" ]; then
keychain ~/.ssh/id_dsa
. ~/.keychain/`uname -n`-sh
fi
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|