cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

protocol:ssh:x11_forwarding.html



X11 Forwarding

Server

/etc/ssh/sshd_config

X11Forwarding yes
#X11DisplayOffset 10      <-  DISPLAY=localhost:10.0
#X11UseLocalhost yes
# grep X11 /etc/ssh/sshd_config
#/etc/init.d/sshd reload


Client

Linux

Connecting Server

# ssh -XC testuser@192.168.0.150

Check

$ echo $DISPLAY
localhost:10.0

$ netstat -at

$ xauth list  

$ xclock &
$ xeyes &
$ xterm &

If you want to su command

$ echo $DISPLAY
localhost:10.0

$ su - oracle

$ echo $DISPLAY            <- check $DISPLYA
$ export DISPLAY=localhost:10.0   <- change $DISPAY
$ echo $DISPLAY

$ xterm &

Windows(Teraterm + Xming)

  1. Connect server with Teraterm
  2. Configure X Forwading
    [Setup] - [SSH Forwarding...]
    [TTSSH: Forwarding Setup] window
      X Forwarding
      ON "Display remote X applications on local X server"
    
  3. Start Xming
  4. xeyes and so on, for check x fowading

Windows(Cygwin)


Tips

mulsistage

user01@mypc:~$ ssh -XC  user01@ladder-server

user01@ladder-server:~$ ssh -XC  user01@target-server

user01@target-server:~$ firefox &



protocol/ssh/x11_forwarding.html.txt ยท Last modified: 2020/04/12 by admin

Page Tools