Skip to content

Instantly share code, notes, and snippets.

@thvitt
Created November 25, 2011 11:15
Show Gist options
  • Save thvitt/1393296 to your computer and use it in GitHub Desktop.
Save thvitt/1393296 to your computer and use it in GitHub Desktop.
A wrapper around screen(1) that forwards the SSH agent
#!/bin/sh
if [ -n "$SSH_AUTH_SOCK" -a -S "$SSH_AUTH_SOCK" ]
then
ln -sf "$SSH_AUTH_SOCK" "$HOME/.ssh/auth-socket"
SSH_AUTH_SOCK="$HOME/.ssh/auth-socket"
fi
exec screen "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment