When I'm using the line below in script:

ssh -Y user@host /home/user/xxx  (xxx is gui script will open GUI window)

It is giving me error as below:

xauth: not found.
stty: : Not a typewriter
X11 connection rejected because of wrong authentication.
X connection to broken (explicit kill or server shutdown). 

One solution I found on the net was to edit /etc/ssh/sshd_config file and set:

X11Forwarding yes

But I can't open sshd_config file:

grep X11Forwarding /etc/ssh/sshd_config
grep: can't open /etc/ssh/sshd_config

But if I run this command:

ssh -Y user@host`

After reached at the new host if I try to execute:

xxx  (xxx is gui script will open GUI window) 

It works fine. I have to use it in script only. Any suggestions?


/etc/ssh/sshd_config must be edited as root. If you don't have the administration rights on the ssh server, then you should ask the administrator to modify the configuration.

Don't forget to have the ssh service restarted after having modified the configuration file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.