Keeps SSH forwarded agent

This commit is contained in:
nemunaire 2014-04-17 10:12:23 +02:00
parent 3a3ee80f7e
commit 2b0a123acf

12
.bashrc
View File

@ -64,12 +64,14 @@ PS1=$PS1'\[\e[$HOST_COLOR;01m\]\h\[\e[00m\]:\[\e[01;34m\]\W\[\e[00m\]'
PS1=$PS1'\[`if [ $? -eq 0 ]; then echo -ne "\033[0;32m"; else echo -ne "\033[0;31m"; fi`\]' PS1=$PS1'\[`if [ $? -eq 0 ]; then echo -ne "\033[0;32m"; else echo -ne "\033[0;31m"; fi`\]'
PS1=$PS1'\$\[\033[0m\] ' PS1=$PS1'\$\[\033[0m\] '
#Agent SSH #SSH agent
if [ ! -f /tmp/ssh-agent.$USER ]; then if [ -z "$SSH_AUTH_SOCK" ]; then # Keeps SSH forwarded agent
ssh-agent > /tmp/ssh-agent.$USER if [ ! -f /tmp/ssh-agent.$USER ]; then
chmod 400 /tmp/ssh-agent.$USER ssh-agent > /tmp/ssh-agent.$USER
chmod 400 /tmp/ssh-agent.$USER
fi
source /tmp/ssh-agent.$USER > /dev/null
fi fi
source /tmp/ssh-agent.$USER > /dev/null
if [ -f ~/.bash_aliases ]; then if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases . ~/.bash_aliases