Changes between Version 20 and Version 21 of TipAndDoc/network/ssh
- Timestamp:
- Apr 14, 2018 5:55:05 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TipAndDoc/network/ssh
v20 v21 24 24 * [http://ngyuki.hatenablog.com/entry/20120508/p1 SSHのエージェントフォワーディングを「sudo」の後でも引き継ぐ - ngの日記] 25 25 > {{{sudo SSH_AUTH_SOCK=$SSH_AUTH_SOCK rsync -av remotehost:/path/ /path/}}} 26 27 * [http://www.gcd.org/blog/2006/09/100/ 仙石浩明の日記: ssh-agent を screen の中から使う方法] 28 > {{{#!sh 29 > agent="$HOME/tmp/ssh-agent-$USER" 30 > if [ -S "$SSH_AUTH_SOCK" ]; then 31 > case $SSH_AUTH_SOCK in 32 > /tmp/*/agent.[0-9]*) 33 > ln -snf "$SSH_AUTH_SOCK" $agent && export SSH_AUTH_SOCK=$agent 34 > esac 35 > elif [ -S $agent ]; then 36 > export SSH_AUTH_SOCK=$agent 37 > else 38 > echo "no ssh-agent" 39 > fi 40 > }}} 26 41 27 42 = X11Forwarding with another user =