Created
August 16, 2013 14:30
-
-
Save elmarcoh/6250407 to your computer and use it in GitHub Desktop.
Fix ssh with auth (cert) fowarding (ssh -A) to work with screen Run this script prior to attaching or launching screen, and it will generate a file named "fixssh" exporting a series of envvars. Once on screen you must source ~/fixssh to use your machine's cert intead of the remote's one.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SSHVARS="SSH_CLIENT SSH_TTY SSH_AUTH_SOCK SSH_CONNECTION DISPLAY" | |
for x in ${SSHVARS} ; do | |
(eval echo $x=\$$x) | sed 's/=/="/ | |
s/$/"/ | |
s/^/export /' | |
done 1>$HOME/fixssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment