IBM Support

How do I speed up ssh by disable the ssh X11 forwarding?

Troubleshooting


Problem

How do I speed up ssh by disable the ssh X11 forwarding?

Resolving The Problem

How do I speed up ssh by disable the ssh X11 forwarding?

Actually it's not due to the DNS issue, it's due to the ssh X11 forwarding.

Here is the test:

[root@chiron sysconfig]# time ssh compute-3-1 hostname
compute-3-1.local

real 0m6.113s
user 0m0.007s
sys 0m0.006s

It takes 6.113s to finish a ssh, then I disable the X11 forwarding:

[root@chiron sysconfig]# unset DISPLAY
[root@chiron sysconfig]# time ssh compute-3-1 hostname
compute-3-1.local

real 0m0.100s
user 0m0.007s
sys 0m0.001s

It reduce to 0.100s, ssh's X11 forwarding is slow since it need to call xauth.

If no user is using ssh's X11 forwarding, we can just disable it in the sshd config file on master node.

If some user do use it, then for those session don't need the ssh X11 forwarding, for bash, we can run "unset DISPLAY', for tcsh, we run "unsetenv DISPLAY", that will disable the X11 forwarding for this session

An alternative way is to create/edit $HOME/.ssh/config file by adding "ForwardX11 no", e.g.
# touch .ssh/config
# chmod 600 .ssh/config
# echo "ForwardX11 no" > .ssh/config

[{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"4.4.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":null,"Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 September 2018

UID

isg3T1014391