2

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?

1 Answer 1

3

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.