Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: 'ssh -X' not working

  1. #1
    Join Date
    Feb 2014
    Location
    Chandler, AZ
    Beans
    54
    Distro
    Ubuntu

    'ssh -X' not working

    I can't actually get X sessions forwarded. /etc/ssh/sshd_config does have


    X11Forwarding yes
    X11DisplayOffset 10


    ssh does seem to be working:


    debug1: Remote: /home/joliver/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
    debug1: Remote: /home/joliver/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
    debug1: Requesting X11 forwarding with authentication spoofing.


    but DISPLAY is still localhost:10.0


    What do I need to do to get X forwarded?

  2. #2
    Join Date
    May 2010
    Beans
    3,443

    Re: 'ssh -X' not working


  3. #3
    Join Date
    May 2010
    Beans
    3,443

  4. #4
    Join Date
    Feb 2014
    Location
    Chandler, AZ
    Beans
    54
    Distro
    Ubuntu

    Re: 'ssh -X' not working

    So this is weird... when I connect, firefox and another application that I care about are launched on the remote host, but xclock is launched on the local host!

  5. #5
    Join Date
    Feb 2014
    Location
    Chandler, AZ
    Beans
    54
    Distro
    Ubuntu

    Re: 'ssh -X' not working

    debug1: Entering interactive session.
    debug1: pledge: exec
    debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
    debug1: client_input_hostkeys: searching /home/joliver/.ssh/known_hosts for 192.168.0.32 / (none)
    debug1: client_input_hostkeys: searching /home/joliver/.ssh/known_hosts2 for 192.168.0.32 / (none)
    debug1: client_input_hostkeys: hostkeys file /home/joliver/.ssh/known_hosts2 does not exist
    debug1: client_input_hostkeys: host key found matching a different name/address, skipping UserKnownHostsFile update
    debug1: Remote: /home/joliver/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
    debug1: Remote: /home/joliver/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
    debug2: channel_input_open_confirmation: channel 0: callback start
    debug2: x11_get_proto: /usr/bin/xauth list :0 2>/dev/null
    debug1: Requesting X11 forwarding with authentication spoofing.
    debug2: channel 0: request x11-req confirm 1
    debug2: fd 3 setting TCP_NODELAY
    debug2: client_session2_setup: id 0
    debug2: channel 0: request pty-req confirm 1
    debug1: Sending environment.
    debug1: channel 0: setting env LANG = "en_US.UTF-8"
    debug2: channel 0: request env confirm 0
    debug2: channel 0: request shell confirm 1
    debug2: channel_input_open_confirmation: channel 0: callback done
    debug2: channel 0: open confirm rwindow 0 rmax 32768
    debug2: channel_input_status_confirm: type 99 id 0
    debug2: X11 forwarding request accepted on channel 0
    debug2: channel_input_status_confirm: type 99 id 0
    debug2: PTY allocation request accepted on channel 0
    debug2: channel 0: rcvd adjust 2097152
    debug2: channel_input_status_confirm: type 99 id 0
    debug2: shell request accepted on channel 0
    Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-119-generic x86_64)

  6. #6
    Join Date
    Feb 2014
    Location
    Chandler, AZ
    Beans
    54
    Distro
    Ubuntu

    Re: 'ssh -X' not working

    joliver@blinky:~$ firefox &
    [1] 188881
    joliver@blinky:~$ debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
    debug1: client_request_x11: request from 127.0.0.1 46020
    debug2: fd 7 setting O_NONBLOCK
    debug1: channel 1: new [x11]
    debug1: confirm x11
    debug2: channel 1: rcvd eof
    debug2: channel 1: output open -> drain
    debug2: channel 1: obuf empty
    debug2: chan_shutdown_write: channel 1: (i0 o1 sock 7 wfd 7 efd -1 [closed])
    debug2: channel 1: output drain -> closed
    debug1: channel 1: FORCE input drain
    debug2: channel 1: ibuf empty
    debug2: channel 1: send eof
    debug2: channel 1: input drain -> closed
    debug2: channel 1: send close
    debug2: channel 1: rcvd close
    debug2: channel 1: is dead
    debug2: channel 1: garbage collecting
    debug1: channel 1: free: x11, nchannels 2

  7. #7
    Join Date
    Feb 2014
    Location
    Chandler, AZ
    Beans
    54
    Distro
    Ubuntu

    Re: 'ssh -X' not working

    That results in the firefox window opening locally on the remote host.

    But...

    joliver@blinky:~$ xclock &
    [1] 188961
    joliver@blinky:~$ debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
    debug1: client_request_x11: request from 127.0.0.1 49278
    debug2: fd 7 setting O_NONBLOCK
    debug1: channel 1: new [x11]
    debug1: confirm x11

    results in xclock opening locally on the host I'm initiating the connection from.

  8. #8
    Join Date
    May 2010
    Beans
    3,443

    Re: 'ssh -X' not working

    Does the client system not have a Web browser installed? Why launch Firefox using X forwarding?

  9. #9
    Join Date
    Feb 2014
    Location
    Chandler, AZ
    Beans
    54
    Distro
    Ubuntu

    Re: 'ssh -X' not working

    Quote Originally Posted by ActionParsnip View Post
    Does the client system not have a Web browser installed? Why launch Firefox using X forwarding?
    Because I want to use Firefox on the remote machine on this local machine, so I don't have to switch between the two.

  10. #10
    Join Date
    May 2010
    Beans
    3,443

    Re: 'ssh -X' not working

    Quote Originally Posted by john163 View Post
    Because I want to use Firefox on the remote machine on this local machine, so I don't have to switch between the two.
    Oh. I mean you could set up an SSH tunnel then set the proxy in the local browser to go through the tunnel then out to the network / Internet from there. Is that the desired goal here?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •