Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is it possible to open a ssh connection passing through Paramiko, as if we had used the command "ssh -X ...", for X11 management by the Server X ?

Thank you for your help,


share|improve this question

migrated from Dec 2 '10 at 5:12

This question came from our site for professional and enthusiast programmers.

Not sure why this was migrated here. If we tag this with python, would it be possible to move it back to SO? – fideli Dec 2 '10 at 5:40
The kind you ask may confuse some of the admin. Paramiko is not that flying word I think. And the rest of that question is ssh related superuser stuff X) – zzeroo Dec 2 '10 at 6:34
The thing is that Paramiko is a Python module and to open an SSH connection with it, you need to write Python code. It's not really a question about SSH. – fideli Dec 2 '10 at 6:52

From the paramiko.Channel documentation:

request_x11(self, screen_number=0, auth_protocol=None, auth_cookie=None, single_connection=False, handler=None)

Request an x11 session on this channel. If the server allows it, further x11 requests can be made from the server to the client, when an x11 application is run in a shell session.

share|improve this answer
This answer to a similar question in SO (it looks by the same author), provides more information with regard to the handler parameter. – jcollado Sep 7 '12 at 15:55

Reading the paramiko code, I realized that paramiko only implements a way to establish an x11 channel. It does not connect the channel to the local x11 display. That is left to you.

Please see this answer for a working example of how to do this:

share|improve this answer

You must log in to answer this question.