0

I'm using tramp to access files in remote via Bastion server using following tramp syntax:

    /ssh:root@BASTION-HOST#BASTION-PORT|root@REAL-HOST#REAL-PORT:

The problem is, whenever I access REAL-HOST, $HOME/.ssh/known_hosts in BASTION-HOST is updated. Since most hosts behind the BASTION-HOST are ephemeral, I don't want TRAMP update known_hosts file.

After looking at tramp-methods, TRAMP does uses -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no on the first host (which is BASTION in this case), but it looks like these options do not propagates to multi-hops.

I'm using Emacs 25.1.1 (Mac)

Any idea?

0

I'm even not sure they are used with the first hop. I've just checked with Emacs 25.2 (as installed with Ubuntu 17.10), And I couldn't find these arguments in the traces.

IIRC, these options are used only for the tunnel and socks methods. That's why the argument in tramp-methods is called tramp-gw-args. Note, that the upcoming Emcs 26.1 (Tramp 2.3) does not support these gateway methods any longer.

Your best guess would be to define an own method in tramp-methods, adding these arguments to tramp-login-args.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.