Skip to content

Instantly share code, notes, and snippets.

@slumos
Created August 24, 2015 18:27
Show Gist options
  • Save slumos/32f19c7b59d49f726f84 to your computer and use it in GitHub Desktop.
Save slumos/32f19c7b59d49f726f84 to your computer and use it in GitHub Desktop.
#! /bin/sh
SOCK_DIR=${HOME}/.ssh
SOCK_NAME=auth.sock
if [ -n "$SSH_AUTH_SOCK" ]; then
[ -d "$SOCK_DIR" ] || mkdir -m 0700 "$SOCK_DIR"
ln -nfs "$SSH_AUTH_SOCK" "$SOCK_DIR/$SOCK_NAME"
export SSH_AUTH_SOCK="$SOCK_DIR/$SOCK_NAME"
fi
#screen_command='screen -xRR'
screen_command="tmux attach"
exec $screen_command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment