reddit / emacs

ssh config ProxyJump not applied

dry-leaf · 2022-07-20 09:42
Hello dear redditors, I have a problem using tramp with my ssh config file and `ProxyJump` . I just can't figure out why it does not work. The situation is the folowoing: Machine\_A ---> JumpMachine ---> Machine\_B My ssh config for that looks as follows: Host Machine_B Hostname <some_ip> User <my_username> Port <some_port> ProxyJump JumpMachine ServerAliveInterval 60 Host JumpMachine Hostname <some_ip> User <Some_user> Port <some_port> ProxyCommand <a_simple_bashscript> IdentityFile <my_identiyfile> Host Machine_B_admin Hostname <some_ip> User <my_admin_username> Port <some_port> ProxyJump JumpMachine ServerAliveInterval 60 Machine B has no PW auth, only the jumpmachine. Both can be obviously accesed using ssh. The setup works with my shell (fish) as well as other shells and with vscode. &#x200B; What is really strange, is that that tramp always asks me for `ssh:Machine_B passsword:` while only the `JumpMachine` has a password. The PW auth is turned off for ssh on `Machine_B`. I tried using the password for `JumpMachine` and `Machine_B` and neither works. TBH I am not really sure what to do by now. I just wanted to mention that there is also another entry for my admin account. Don't know if that matters in any way. Any tips?
ndpian · 2022-07-20 12:59
Fwiw, I made jump hosts work without pw access by making sure the same key file pairs (Identity files) are present in local (my laptop) and the jump host. Could be worth a try.
dry-leaf · 2022-07-20 13:30
You mean the public one? I actually have multiple, so that could be the problem. Thank you!
ndpian · 2022-07-20 13:51
What I typically do is create a new key pair for my remote behind the jump host, and copy the same pairs to the jump host. Using this, the identityfile is first used in local, to go from local->jump host. Then, the same identityfile (now residing in the jump host) is now used to go from jump-host -> remote. I don't fully understand why this works, possibly an issue with file paths.