What is the difference between
ssh -Y (trusted X11 forwarding) and
ssh -X (untrusted X11 forwarding)? As far as I have understood it, it has something to do with security, but I did not grasp the difference and when to use which.
Both options have something to do with X11 forwarding. This means if you enable this you can use a graphical client through your SSH session (i.e. use Firefox or something else).
If you use
But if you use
If you want to know more about those things I suggest reading the Xsecurity manpage or the X Security extension spec. Furthermore you can check the options
Use neither when you don't need to run X11 programs remotely; use
Trusted X11 forwarding is enabled by
Untrusted X11 forwarding tries to restrict remote programs to accessing only their own windows, and to using only those parts of X which are relatively secure. Which sounds good, but currently doesn't work well in practice.
The meaning of
On Ubuntu 14.04 LTS, unless you edit your
Yes. -Y is for trusted X11 forwarding, while -X is for untrusted X11 forwarding. X11 forwarding just allows you to use X11 (i.e. graphical) applications over an SSH session.
I'm not sure what the meaningful difference is between trusted and untrusted X11 connections, but I'm sure it has to do with the server-side configuration (i.e. ssh-config, sshd-config, etc.). Check with your server or network admin about which flag to use.
It's more secure to use