Results 1 to 4 of 4
|
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
10-24-2006 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
How to automatically source bashrc over ssh?
I am using ssh with rsa key (no password) to login to a remote computer.
How do I get the remote shell to source the remote ~/.bashrc file automatically after ssh?
At the moment, after I ssh, I have to run "bash" explicitly.
All I want to do is have a remote directory added to my remote path automatically after ssh. I have tried adding the PATH command in ~/.bashrc, ~/.bash_profile, and ~/.bash_login, but none of these are sourced after ssh. Only after I type the command "bash" is the directory added to the path.
Thanks.
-
10-24-2006 #2
Are you sure your default shell is bash? Try echo $SHELL. If so, it should source .bash_profile by default.
Flies of a particular kind, i.e. time-flies, are fond of an arrow.
Registered Linux User #408794
-
10-25-2006 #3Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
echo $SHELL gives /bin/tcsh
Apparently the default shell is tcsh.
Which file should I edit so that ssh goes to a bash shell instead of the default tcsh shell?
(I have no system privileges.)
-
10-25-2006 #4Just Joined!
- Join Date
- Oct 2006
- Posts
- 3
Problem Solved
I created a ~/.tcshrc file with the script to add the directory to the path.
That works.
Thanks for the lead about the different default shell.


Reply With Quote
