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.


1 Answer 1


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.

  • 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 9, 2016 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 9, 2016 at 20:55
  • 2
    this is worth a read for anyone landing here security.stackexchange.com/questions/14815/… Aug 3, 2019 at 2:37

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.