Disable SSH forwarding

By default, the OpenSSH daemon is configured to enable X11 forwarding. This configuration can sometimes slow down host connections and MPI jobs. You can disable SSH forwarding to improve connection speed.

Before you begin

Before you disable SSH forwarding however, check that your management node is installed with a valid DNS server. Slow connections are not always necessarily caused by X11 forwarding. Sometimes, an SSH connection from one host to another might be slow in setting up because of a name resolution failure, and subsequent timeout. This can occur if the management node is installed with an invalid DNS server.

Procedure

  • Skip X11 forwarding by using the -x option when you connect to a host.
  • You can also disable forwarding permanently by editing the /etc/ssh/ssh_config file and setting the line ForwardX11Trusted Yes to ForwardX11Trusted No.