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

Using et through a jumphost #532

Closed
rayjlinden opened this issue Aug 25, 2022 · 13 comments · Fixed by #614
Closed

Using et through a jumphost #532

rayjlinden opened this issue Aug 25, 2022 · 13 comments · Fixed by #614

Comments

@rayjlinden
Copy link

I've been using et for a while over a VPN - works great!

However, we are moving to use a jumphost instead. I can not seem to get et to work through the jump host.

I can jump through the jumpiest just fine with ssh. I do it like this:

With et though things just hang for me. Here is what I'm running:

et --jumphost backdoor.dev.tilia-inc.com  -c "tmux -CC -S /tmp/shareds attach -t shared || tmux -CC -S /tmp/shareds new -s shared" [email protected]

I'm probably doing something wrong. So any help would be appreciated. Or at least some guidance on how to debug this better?

@MisterTea
Copy link
Owner

Is the et server running on the jumphost?

@rayjlinden
Copy link
Author

rayjlinden commented Aug 25, 2022 via email

@jshort
Copy link
Collaborator

jshort commented Dec 1, 2022

@rayjlinden Can you provide logs from your client (/tmp/etclient-) and your server(s) (/tmp/etserver- and /tmp/etterminal--*).

Also I'd recommend removing your complex -c arg and trying to simply get to a shell on your target host to debug the issue.

@jshort jshort changed the title Using et through a jumpiest Using et through a jumphost Dec 6, 2022
@yurenchen000
Copy link

heavily Inspired by ET
in order to interoperability with ssh

  • as jump host
  • connection multiplexing
  • run cmd like ssh

I made a ssh proxyCommand tool to achieve that goal
ssh-keep

@ddebin
Copy link
Contributor

ddebin commented Jan 31, 2024

Same bug here, can't ProxyJump. I found the bug lie in the parsing of the hostname string when you specify a user.

et [email protected] --jumphost bastion.server.com works though it connects to bastion.server.com with local user.

But et [email protected] --jumphost [email protected] doesn't work as it parses the hostname to connect to as [email protected].

It's visible in the error message Could not reach the ET server: [email protected]:2022 (we should read Could not reach the ET server: bastion.server.com:2022).

(MacOS, Apple Silicon M1)

@AGI-chandler
Copy link

At first we could not connect to the destination from the jump host due to SSH Agent error.  That appears resolved with et's -f option and now we've been able to connect to our destination by first connecting to the jump host.

However, still unable to connect to our destination through the jump host with a single command.  Is it due to this issue which was fixed in #614 but not exist in our version of et yet?  We just upgraded to version 6.2.8-trixie2 from https://mistertea.github.io/debian-et/debian-source trixie/main amd64 Packages.

Can you help us establish this connection?

~/.ssh/config:

Host myJumphost
	HostName JumpHost.Arizona.EDU
	IdentityFile ~/.ssh/me.myJumphost
Host dest
	User dest-user
	Hostname Dest.arizona.edu
	IdentityFile ~/.ssh/dest-user.dest
	ProxyJump myJumphost

SSH works as expected:

$ ssh dest
Last login:  earlier  from  myJumphost
[dest-user@dest ~]$ 

Issues with et:

$ et dest
Could not reach the ET server: myJumphost:2022

etclient.log:

[INFO today earlier client-main ParseConfigFile.hpp:1400] unsupported config line: foo yes, ignored
[...20-30 more unsupported config lines found, ignored...]
[INFO today earlier+,001 client-main TerminalClientMain.cpp:244] Parsed ssh config file, connecting to Dest.arizona.edu
[INFO today earlier+,001 client-main TerminalClientMain.cpp:270] ProxyJump found for dst in ssh config: myJumphost
[INFO today earlier+,001 client-main TerminalClientMain.cpp:277] Setting port to jumphost port

etclient-stderr.log:

Setting up and starting sentry
Shutting down sentry

Issue 1 [believed resolved]:

Attempted fix & Issue 2 [unresolved]:

$ et -f dest
Could not reach the ET server: myJumphost:2022

etclient.log and etclient-stderr.log contain the same messages as without -f option.

Have tried different combinations of options like putting the full hostname of myJumphost in the ~/.ssh/config, or removing myJumphost entry from the config and specifying jump options with the command, and so on, but always "could not reach the ET server".

@AGI-chandler
Copy link

Hi @MisterTea, any feedback regarding above connection issue and how we might get connected to our server via the jump host?  Thanks

@MisterTea
Copy link
Owner

Does it work if you make two et connections (one to the jumphost and then another et connection from within the jumphost to the destination)?

@AGI-chandler
Copy link

Yes sir, it does, but only if -f is used with first connection to myJumphost (otherwise SSH_AUTH_SOCK error):

$ et -f myJumphost

[me@myJumphost ~]$ 
[me@myJumphost ~]$ et dest

[dest-user@dest ~]$ 

@MisterTea
Copy link
Owner

Can you try using the -J command directly instead of relying on the ssh config and see if that works?

@AGI-chandler
Copy link

Can you try using the -J command directly instead of relying on the ssh config and see if that works?

Idk what you mean.  There is no -J option for et and I don't see a way to use ssh's -J option with et.  There is only --ssh-option arg Options to pass down to 'ssh -o'.  The man page for -J says:

This is a shortcut to specify a ProxyJump configuration directive.  Note that configuration direc‐
tives supplied on the command-line generally apply to the destination host and not any specified jump hosts.
Use ~/.ssh/config to specify configuration for jump hosts.

Since myJumphost has a different login user and different key file, ~/.ssh/config must be used.  Thus I renamed my ~/.ssh/config to ~/.ssh/config.disabled and used an ~/.ssh/config with only:

Host myJumphost
	HostName JumpHost.Arizona.EDU
	IdentityFile ~/.ssh/me.myJumphost

and tried: et --ssh-option ProxyJump=myJumphost --ssh-option User=dest-user --ssh-option IdentityFile=~/.ssh/dest-user.dest dest.arizona.edu

Result:
Could not reach the ET server: dest.arizona.edu:2022

I added -v 1 to the et command and checked the log file, it started with this:
[INFO date time client-main ParseConfigFile.hpp:1400] unsupported config line: IdentityFile ~/.ssh/me.myJumphost, ignored

Tried using /home/me instead of ~ but still being ignored.  That took a couple hours already, any further suggestions or ideas?

@MisterTea
Copy link
Owner

There should be a -J option in et. The longform is --jumphost

@rayjlinden
Copy link
Author

rayjlinden commented Apr 27, 2024 via email

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

Successfully merging a pull request may close this issue.

6 participants