Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH forwarding doesn't work #367

Open
ghost opened this issue Jan 16, 2018 · 1 comment
Open

SSH forwarding doesn't work #367

ghost opened this issue Jan 16, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 16, 2018

Using the -A option isn't forwarding the ssh agent.

Running with regular ssh command
Running presto-admin file run /path/to/file -A (the file has a env command)

ssh -A [email protected] -C "env"
XDG_SESSION_ID=27
SELINUX_ROLE_REQUESTED=
SHELL=/bin/bash
SSH_CLIENT=79.176.159.191 51009 22
SELINUX_USE_CURRENT_RANGE=
USER=centos
SSH_AUTH_SOCK=/tmp/ssh-jZ5dPMnANa/agent.8081
MAIL=/var/mail/centos
PATH=/usr/local/bin:/usr/bin
PWD=/home/centos
LANG=en_US.UTF-8
SELINUX_LEVEL_REQUESTED=
SHLVL=1
HOME=/home/centos
LOGNAME=centos
SSH_CONNECTION=79.176.159.191 51009 10.0.0.90 22
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/1000
_=/usr/bin/env


presto-admin file run /var/folders/86/hp4s9wxn43q5fcm9850qzbn80000gn/T/tmp.RZuorAUY -A
[some-instance.us-west-2.compute.amazonaws.com] out: HOSTNAME=ip-10-0-0-90.us-west-2.compute.internal
[some-instance.us-west-2.compute.amazonaws.com] out: TERM=vt100
some-instanceus-west-2.compute.amazonaws.com] out: SHELL=/bin/bash
[some-instance.us-west-2.compute.amazonaws.com] out: HISTSIZE=1000
[some-instance.us-west-2.compute.amazonaws.com] out: USER=root
[some-instance.us-west-2.compute.amazonaws.com] out: [some-instance.us-west-2.compute.amazonaws.com] out: SUDO_USER=centos
[some-instance.us-west-2.compute.amazonaws.com] out: SUDO_UID=1000
[some-instance.us-west-2.compute.amazonaws.com] out: USERNAME=root
[some-instance.us-west-2.compute.amazonaws.com] out: MAIL=/var/spool/mail/root
[some-instance.us-west-2.compute.amazonaws.com] out: PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[some-instance.us-west-2.compute.amazonaws.com] out: PWD=/home/centos
[some-instance.us-west-2.compute.amazonaws.com] out: LANG=en_US.UTF-8
[some-instance.us-west-2.compute.amazonaws.com] out: HISTCONTROL=ignoredups
[some-instance.us-west-2.compute.amazonaws.com] out: HOME=/root
[some-instance.us-west-2.compute.amazonaws.com] out: SUDO_COMMAND=/bin/bash -l -c /tmp/tmp.RZuorAUY
[some-instance.us-west-2.compute.amazonaws.com] out: SHLVL=2
[some-instance.us-west-2.compute.amazonaws.com] out: LOGNAME=root
[some-instance.us-west-2.compute.amazonaws.com] out: LESSOPEN=||/usr/bin/lesspipe.sh %s
[some-instance.us-west-2.compute.amazonaws.com] out: SUDO_GID=1000
[some-instance.us-west-2.compute.amazonaws.com] out: _=/bin/env

You can see that the SSH_AUTH_SOCK is missing

@yuokada
Copy link
Contributor

yuokada commented May 28, 2018

We use ~/.ssh/config to set ForwardAgent.

Host *
    ForwardAgent yes
    # SomeSetting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant