Results 1 to 5 of 5
Hello,
I often have to login on a remote server with a shared user. The servers do not have the same configuration. Especially regarding the shell used (some account use ...
- 01-10-2012 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 4
Automatize actions right after ssh login
Hello,
I often have to login on a remote server with a shared user. The servers do not have the same configuration. Especially regarding the shell used (some account use sh, other csh, or ksh or bash).
I would like to use an unified configuration while using all these servers. So I use the following command to connect :
And that works fine. I now have a bash shell when connecting on any server.Code:ssh $user_AT_$server -t exec bash
Now, I would like to go a bit further and have an unified prompt.
How can I emulate something like
?Code:export PS1=$string
Obviouslywon't work.Code:ssh $user_AT_$server -t exec bash -c 'export PS1=something'
Thanks.
- 01-10-2012 #2
When you use -t exec bash, does that source .bashrc?
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-10-2012 #3Just Joined!
- Join Date
- Jan 2012
- Posts
- 4
Hi,
Yes, but I can't modify it.
As I said there are many users on theses system. Some might already be using bash. I can't change that.
- 01-10-2012 #4Just Joined!
- Join Date
- Jan 2012
- Posts
- 4
That said, if I can make bash execute an alternative profile file, that would be awesome.
Maybe I can do that with --rcfile?
I'll try that.
- 01-10-2012 #5Just Joined!
- Join Date
- Jan 2012
- Posts
- 4
Yes it works.

Problem solved.


Reply With Quote