I am testing out Google Compute Engine (with an instance running Debian), and I have trouble using X11 forwarding through ssh. To connect to my instance I use
gcloud compute ssh --ssh-flag="-X" instance-name
While connecting I get the following response to the screen
X11 forwarding request failed on channel 0
and X11 forwarding does not work. Is this a problem of proper configuration of shh or perhaps something related to GCE?
I hope someone can help me get X11 forwarding up and running
Go to Connection, select SSH, and then click Then, click on Browse to select the private key generated earlier If you are using key based authentication. Go to Connection, select SSH, and then click on Then, select enable X11 forwarding.
You first need to make a few minor changes to your Linux machine to enable X11 forwarding. In this example, we'll use a standard CentOS 6.5 installation with GNOME installed. Other Linux distributions will have a very similar SSH daemon configuration. Locate the SSH configuration file at /etc/ssh/sshd_config.
Enabling IP forwarding when creating a VM Click Create instance. Expand the Networking, disks, security, management, sole-tenancy section. Expand the Networking section. In the IP forwarding section, select Enable.
I believe that you’re affected by a Debian bug, that prevents you from being able to use X11 forwarding.
Adding AddressFamily inet
in /etc/ssh/sshd_config
and restarting the SSH server should work.
If it still doesn't work, you could you try to add X11UseLocalhost no
in the same file and restart the SSH server again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With