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

Add support for agent forwarding #41

Closed
eskhool opened this issue Jun 19, 2017 · 22 comments
Closed

Add support for agent forwarding #41

eskhool opened this issue Jun 19, 2017 · 22 comments

Comments

@eskhool
Copy link

eskhool commented Jun 19, 2017

Passing -s "-A" to et does not forward ssh agent credentials which work otherwise. I was assuming ssh agent forwarding would work seamlessly with et?

Am I doing something wrong here?

If not, surprised this hasn't come up yet since I got here from mosh recommended by someone for exactly this purpose.

@MisterTea
Copy link
Owner

I think you need to do:

-s "-A myuser@myhost:myport"

You are missing the hostname/port part

@eskhool
Copy link
Author

eskhool commented Jun 26, 2017

@MisterTea, I think this is the same problem of not using the ssh config mechanism. Is there no way you can bypass having to parse the ssh argument logic and let ssh do its thing for the initial connection? I have ssh agent setup with hosts and all and I don't really need to provide any parameters. Much like the username (for which luckily I have pasted a solution in the other issue)

@MisterTea
Copy link
Owner

MisterTea commented Jun 26, 2017

@eskhool SSH should be using ssh_config, but etclient/etserver won't use it. So, whatever agent forwarding you have in ssh should work fine for the initial handshake. After that, you are using the et passkey so you shouldn't need agent forwarding.

@MisterTea
Copy link
Owner

Hey @eskhool is this still an issue?

@burgalon
Copy link

I'm still experiencing this, also with your suggestion of -s "-A myuser@myhost:myport" .
Can we reopen?

@MisterTea MisterTea reopened this Oct 14, 2017
@MisterTea
Copy link
Owner

@burgalon Are you using the latest master code or the release?

@burgalon
Copy link

release 4.0.5 etclient. Help is showing -c should be available.

@MisterTea
Copy link
Owner

what happens when you use my suggestion above?

@burgalon
Copy link

when using your suggestion above, nothing appears different - same output as without the -c

@MisterTea
Copy link
Owner

I meant my suggestion for using -s to do ssh agent forwarding

@burgalon
Copy link

looking closer, it seems like -s is not working at all, as if it's not taking the arguments at all. doing -s '-p 8888' doesn't seem to kick in, and ssh is still connecting on the regular port. This is weird since I remember it was working (possibly on etclient 4.0.4?)

@MisterTea
Copy link
Owner

Maybe your et install has been corrupted somehow? Can you do a 'which et' and make sure it's using /usr/local/bin/et ? Also try to remove the package and reinstall and then check the timestamp to make sure the et launcher is up to date.

@burgalon
Copy link

I seemed to have installed versnion 3.0.6. I did brew uninstall --force et to remove all version and then again brew install MisterTea/et/et but -s still doesn't seem to work.
It seems like there's still something dirty in my configuration/installation, but I'm not sure how to check.

@MisterTea
Copy link
Owner

What does et --version say?

@burgalon
Copy link

➜  ~ et --version
etclient version 4.0.5

@MisterTea
Copy link
Owner

@burgalon -s is being removed in the next release. Instead, put any ssh options in your ssh_config file. When et calls ssh, the options are loaded by ssh already.

@burgalon
Copy link

from what it seems, the ssh config is also not taken. My .ssh/config has ForwardAgent yes which works well with regular ssh, but doesn't with et

@MisterTea
Copy link
Owner

@burgalon if you look at the et file, it's just a bash script that calls ssh. Can you debug on your side and see why it's not using your ssh config?

@MisterTea MisterTea changed the title ssh agent forwarding not working Add support for agent forwarding Oct 30, 2017
@burgalon
Copy link

For reference - mobile-shell/mosh#696

@donifer
Copy link

donifer commented Nov 6, 2018

I'm having the same issue, my ~/.ssh/config looks like this:

Host *
    ForwardAgent yes
    AddKeysToAgent yes
    IdentityFile ~/.ssh/id_rsa

However I can't clone my private repos when I use et (permission denied). But if I ssh I can clone without issues, looks like ssh agent is not forwarding. Do you guys have an idea of what am I missing?

Client

macOS 10.13.6
❯ et --version
et version 5.1.8

Server

jessie
❯ et --version
et version 4.2.1

@MisterTea MisterTea reopened this Sep 1, 2019
@MisterTea
Copy link
Owner

Adding agent forwarding here: #226

@isaacs
Copy link

isaacs commented Nov 30, 2019

Should this be working in 6.0.4?

I have 6.0.4 on my local macbook, and my linux server. I'm running et -f server to connect.

On the remote server, I can see:

$ echo $SSH_AUTH_SOCK
/tmp/et_forward_sock_nS3kix/sock

However, once there:

$ ssh localhost
isaacs@localhost: Permission denied (publickey).

Using just SSH alone, this works fine:

$ ssh izs.me
Krypton ▶ Requesting SSH authentication from phone
Krypton ▶ Success. Request Allowed ✔

...

Last login: Sat Nov 30 07:18:55 2019 from 73.189.145.159

izs:~ [email protected]
$ ssh localhost
Krypton ▶ Requesting SSH authentication from phone
Krypton ▶ Phone approval required. Respond using the Krypton app
Krypton ▶ Success. Request Allowed ✔
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-66-generic x86_64)

...

UPDATE: this works when using plain old fashioned text ssh keys, not when using krypton's IdentityAgent and ProxyCommand. I'll post a new issue about it.

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

5 participants