Skip to content

Instantly share code, notes, and snippets.

@filipenf
Created July 27, 2018 08:59
Show Gist options
  • Save filipenf/12f1c3cecf1410de344cffa75b6ca789 to your computer and use it in GitHub Desktop.
Save filipenf/12f1c3cecf1410de344cffa75b6ca789 to your computer and use it in GitHub Desktop.
tmux ssh agent fix
#!/bin/bash
#fix ssh-agent when attaching to a tmux session
fixssh() {
eval $(tmux show-env \
|sed -n 's/^\(SSH_[^=]*\)=\(.*\)/export \1="\2"/p')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment