This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
doc:howto:ssh-agent-workaround [2017/01/08 12:55] stefanbaur created |
doc:howto:ssh-agent-workaround [2018/07/03 13:24] (current) stefanbaur |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| Put this at the end of ''/ | Put this at the end of ''/ | ||
| + | |||
| < | < | ||
| Line 14: | Line 15: | ||
| # check we have an agent socket and | # check we have an agent socket and | ||
| - | # check we have an ~/.x2goclient | + | # check we have an ~/.x2go directory |
| if [ -n " | if [ -n " | ||
| - | [ -d ~/.x2goclient | + | [ -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/ | + | touch ~/.x2go/ |
| - | chmod 600 ~/.x2goclient/ | + | chmod 600 ~/.x2go/ |
| - | chown $USER ~/.x2goclient/ | + | chown $USER ~/.x2go/ |
| # write file name of agent socket into file | # write file name of agent socket into file | ||
| - | echo $SSH_AUTH_SOCK >~/.x2goclient/ | + | echo $SSH_AUTH_SOCK >~/.x2go/ |
| fi | fi | ||
| Line 32: | 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 |
| if which x2golistsessions >/ | if which x2golistsessions >/ | ||
| [ -n " | [ -n " | ||
| Line 40: | Line 41: | ||
| $8 == "' | $8 == "' | ||
| awk ' | awk ' | ||
| - | [ -f ~/.x2goclient/ | + | [ -f ~/.x2go/ |
| # 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/ | + | MIGHTBEOURAGENT=$(cat ~/.x2go/ |
| # check if it corresponds to an existing socket | # check if it corresponds to an existing socket | ||
| if [ -S " | if [ -S " | ||
| Line 54: | Line 55: | ||
| # ---- END X2Go SSH forwarding workaround ---- | # ---- END X2Go SSH forwarding workaround ---- | ||
| - | </file> | + | </code> |
| Now, start a **regular** SSH session with Agent Forwarding enabled **first**, and leave that session running in the background. | Now, start a **regular** SSH session with Agent Forwarding enabled **first**, and leave that session running in the background. | ||