LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   ssh X11 forwarding (https://www.linuxquestions.org/questions/linux-security-4/ssh-x11-forwarding-892626/)

the_gripmaster 07-19-2011 10:20 PM

ssh X11 forwarding
 
Following is assumed:
1. user connects to a remote server without the X11 forwarding -X option (ssh someserver)
2. ForwardX11Trusted is set to no in the /etc/ssh/ssh_config file of the user's system

Question:
After the ssh connection is made without the -X option, is it possible to enable the X11 forwarding?

Code:

[abcd@someclient ~]$ ssh someserver
...
...
[abcd@someserver ~]$

Oops, forgot the -X option, how do I enable X11 now? I don't want to disconnect and reconnect using ssh -X.

Thanks,

Reuti 07-20-2011 10:43 AM

You can put in your personal ~/.ssh/config:
Code:

Host *
    ForwardX11 yes
    ForwardX11Trusted yes

so that it’s set in the future automatically all the time.

the_gripmaster 07-21-2011 02:20 AM

Quote:

Originally Posted by Reuti (Post 4420235)
You can put in your personal ~/.ssh/config:
Code:

Host *
    ForwardX11 yes
    ForwardX11Trusted yes

so that it’s set in the future automatically all the time.

Thanks but I still would like to know the answer to my original question.

Reuti 07-21-2011 04:26 AM

I’m not aware of any option to create tunnels later on besides the initial connection. Your request would be similar to add -L or -R options later on and also maybe to remove them individually again. I would assume it’s not implemented for safety reasons. You could add tunnels without authentication then as the connection is already established.


All times are GMT -5. The time now is 03:45 AM.