Skip to content

Instantly share code, notes, and snippets.

@copperlight
Created August 11, 2016 16:27
Show Gist options
  • Select an option

  • Save copperlight/e9eaa40d6f3bb9e1e6e6b1dd8ba0a8d5 to your computer and use it in GitHub Desktop.

Select an option

Save copperlight/e9eaa40d6f3bb9e1e6e6b1dd8ba0a8d5 to your computer and use it in GitHub Desktop.

Revisions

  1. copperlight revised this gist Aug 11, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .bashrc
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ if [ -z "$(pgrep ssh-agent)" ]; then
    eval $(ssh-agent -s) > /dev/null
    else
    export SSH_AGENT_PID=$(pgrep ssh-agent)
    export SSH_AUTH_SOCK=$(ls -l /tmp/ssh-*/agent.* 2>/dev/null |awk '{print $9}')
    export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
    fi

    if [ "$(ssh-add -l)" == "The agent has no identities." ]; then
  2. copperlight created this gist Aug 11, 2016.
    19 changes: 19 additions & 0 deletions .bashrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    # ... more above ...

    # wsfl bash is not a login shell
    if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
    fi

    # ssh-agent configuration
    if [ -z "$(pgrep ssh-agent)" ]; then
    rm -rf /tmp/ssh-*
    eval $(ssh-agent -s) > /dev/null
    else
    export SSH_AGENT_PID=$(pgrep ssh-agent)
    export SSH_AUTH_SOCK=$(ls -l /tmp/ssh-*/agent.* 2>/dev/null |awk '{print $9}')
    fi

    if [ "$(ssh-add -l)" == "The agent has no identities." ]; then
    ssh-add
    fi