User Tools

Site Tools


doc:howto:ssh-agent-workaround

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:ssh-agent-workaround [2017/01/08 12:55]
stefanbaur
doc:howto:ssh-agent-workaround [2018/07/03 13:24] (current)
stefanbaur
Line 15: Line 15:
  
 # check we have an agent socket and # check we have an agent socket and
-# check we have an ~/.x2goclient ​directory+# check we have an ~/.x2go directory
 if [ -n "​$SSH_AUTH_SOCK"​ ] && \ if [ -n "​$SSH_AUTH_SOCK"​ ] && \
-   [ -d ~/.x2goclient ​] ; then+   [ -d ~/.x2go ] ; then
         # touch the output file and set permissions         # touch the output file and set permissions
         # (as tight as possible)         # (as tight as possible)
-        touch ~/.x2goclient/​agentsocket +        touch ~/.x2go/​agentsocket 
-        chmod 600 ~/.x2goclient/​agentsocket +        chmod 600 ~/.x2go/​agentsocket 
-        chown $USER ~/.x2goclient/​agentsocket+        chown $USER ~/.x2go/​agentsocket
         # write file name of agent socket into file         # write file name of agent socket into file
-        echo $SSH_AUTH_SOCK >~/.x2goclient/​agentsocket+        echo $SSH_AUTH_SOCK >~/.x2go/​agentsocket
 fi fi
  
Line 33: Line 33:
 # check our client DISPLAY and SSH client IP correspond to # check our client DISPLAY and SSH client IP correspond to
 # a running X2Go session and # a running X2Go session and
-# check ~/.x2goclient/agent is a regular file+# check ~/.x2go/agentsocket ​is a regular file
 if which x2golistsessions >/​dev/​null && \ if which x2golistsessions >/​dev/​null && \
    [ -n "​$DISPLAY"​ ] && \    [ -n "​$DISPLAY"​ ] && \
Line 41: Line 41:
                     $8 == "'​$(echo $SSH_CLIENT | \                     $8 == "'​$(echo $SSH_CLIENT | \
                     awk '​{print $1}'​)'"​ { print $3 }'​)"​ ] && \                     awk '​{print $1}'​)'"​ { print $3 }'​)"​ ] && \
-   [ -f ~/.x2goclient/​agentsocket ] ; then+   [ -f ~/.x2go/​agentsocket ] ; then
         # all checks passed, read content of file         # all checks passed, read content of file
         # (might still contain stale agent socket or garbage         # (might still contain stale agent socket or garbage
-        MIGHTBEOURAGENT=$(cat ~/.x2goclient/​agentsocket)+        MIGHTBEOURAGENT=$(cat ~/.x2go/​agentsocket)
         # check if it corresponds to an existing socket         # check if it corresponds to an existing socket
         if [ -S "​$MIGHTBEOURAGENT"​ ]; then         if [ -S "​$MIGHTBEOURAGENT"​ ]; then
doc/howto/ssh-agent-workaround.1483880143.txt.gz · Last modified: 2017/01/08 12:55 by stefanbaur