32

So if I'm VPN'ing in from home, I want all of those connections to have -X specified. I already have the keys copied and an entry in ~/.config with the ip and userid so all I have to do is go: ssh wk so this is the last fly in the ointment.

user447607
  • 493
  • 1
  • 6
  • 9

1 Answers1

57

If you peek into the manual page for ssh_config, you will find an option ForwardX11, which can be put in your config such as:

Host wk
  Hostname W.X.Y.Z
  ForwardX11 yes

And then your connections to host wk will have X11 forwarding enabled by default.

Jakuje
  • 9,715
  • 2
  • 42
  • 45
  • Yup. Numbskull moment for me although in the past the settings were different in /etc/ssh/sshd_config than they were in ~/.ssh/config – user447607 Jan 09 '16 at 20:53
  • 2
    they still are. `ssh_config` and `sshd_config` are different things with different options and different manual pages with description inside. – Jakuje Jan 09 '16 at 20:55
  • 2
    this is worth a read for anyone landing here https://security.stackexchange.com/questions/14815/security-concerns-with-x11-forwarding – Shapeshifter Aug 03 '19 at 02:37