On 11/24/2015 05:10 AM, Dmitry Bely wrote:
Hi,
I would like to use ssh-agent globally for X session (Debian/MATE if it matters). X session starts it itself and when I login to X locally it works as expected (SSH_AGENT_PID and SSH_AUTH_SOCK environment variables are set correctly). But if I connect to the host via x2go, strange things happen: in any terminal session SSH_AUTH_SOCK points to non-existing path and SSH_AGENT_PID is not set at all. I tried to work around this adding to ~/.bashrc:
if [ ! -S ~/.ssh/ssh_auth_sock ]; then eval
ssh-agent -s
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock fi export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sockThis way SSH_AUTH_SOCK is correct but SSH_AGENT_PID is surprisingly unset somethere. Any idea how to fix that?
I don't quite follow what you mean by "globally". Are you using desktop-sharing and connecting to an existing X session and want to use that ssh-agent? In that case perhaps your x2go ssh connection is forwarding the ssh-agent connection from the client machine and you need to disable the agent forwarding.
-- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA, Boulder/CoRA Office FAX: 303-415-9702 3380 Mitchell Lane orion@nwra.com Boulder, CO 80301 http://www.nwra.com