bashrc: ssh-agent works when multiple users have the same conf on the same machine
This commit is contained in:
parent
87cd9117ab
commit
bc59a395e1
8
.bashrc
8
.bashrc
@ -65,11 +65,11 @@ PS1=$PS1'\[`if [ $? -eq 0 ]; then echo -ne "\033[0;32m"; else echo -ne "\033[0;3
|
||||
PS1=$PS1'\$\[\033[0m\] '
|
||||
|
||||
#Agent SSH
|
||||
if [ ! -f /tmp/ssh-agent.profile ]; then
|
||||
ssh-agent > /tmp/ssh-agent.profile
|
||||
chmod 400 /tmp/ssh-agent.profile
|
||||
if [ ! -f /tmp/ssh-agent.$USER ]; then
|
||||
ssh-agent > /tmp/ssh-agent.$USER
|
||||
chmod 400 /tmp/ssh-agent.$USER
|
||||
fi
|
||||
source /tmp/ssh-agent.profile > /dev/null
|
||||
source /tmp/ssh-agent.$USER > /dev/null
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
|
Loading…
Reference in New Issue
Block a user