Force SSH session without/disabling X11 forwarding.

I would like to disable X11 session forcefully. I have tried the following things:

  1. Setting appropriate DISPLAY variable in the /etc/environment file to be "0.0"
  2. I have tried setting the sshd_config parameter X11Forwarding to be "no"

This session communication is happening by exchanging private file "id_rsa" so as to gain password-less communication between client and server.

What config changes would I be required to do on server and client side?
NOTE: Using Ubuntu 14.04 AMI's on AWS for the above case.

How about using ssh encapsulation (ssh -Y ) from the client side ?

If you use that, and have an X on client, exporting DISPLAY will not be required.

Hope that helps.
Regards
Peasant.

1 Like

Did you tried to restart X server instead? :slight_smile: