-1

Situation:

I frequently connect to one Linux Mint 18 machine, from Linux Mint 18, over SSH. I now have a need, without copying the files to me that is, to view pictures stored on the remote machine on my desktop, not in terminal in some pseudo-image format.

Non-permanent solution:

What works is adding -Y parameter to the ssh command. So it is fine, but I don't like always appending it to the command.

I connect like this:

ssh -Y herusename@192.168.0.100

And display image as follows:

feh *.jpg

Manual only says:

-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

Question:

How can I set up SSH config file to make this option permanent?

8
Host 192.168.0.100           # and/or preferred aliases
    Hostname 192.168.0.100   # if 'Host' is alias rather than actual hostname/IP
    User herusename
    ForwardX11 yes
    ForwardX11Trusted yes
    ... other options for this host ...

man ssh_config

  • You would put this in the config file of whoever is currently executing the ssh -Y... command in your question. – user4556274 Aug 1 '16 at 12:16
  • You want this in your ssh_config, not your sshd_config. Typically, this means a personal configuration at ~/.ssh/config, although if you have multiple users who need to use this setup, you could put it in the global /etc/ssh/ssh_config. – user4556274 Aug 1 '16 at 12:30
-1

A simple alternative, if you're willing to use X11 forwarding for all ssh connections:

Just define an

alias ssh='/usr/bin/ssh -Y'

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.