LoginSignup
47
53

More than 5 years have passed since last update.

X11 Forwarding設定

Last updated at Posted at 2015-04-22

Linux上でJavaのアプリなどを導入しようと思ったのだがクラウド上の鯖でGUIログイン出来ないのでVNC等のやり方ではなくX11 Forwardingでやりたいと思った。
こいつが出来るようになるといろいろと捗ると思われる。

鯖側設定

sshd_config設定

  1. /etc/ssh/sshd_configを編集
/etc/ssh/sshd_config
$ vi /etc/ssh/sshd_config
  # X11Forwarding no
  X11Forwarding yes
  1. sshdを再起動
# service sshd restart

Mac

X11(XQuartz)

  1. 以前のmacだと標準でX11が入っていたが最近のはXQuartz←こいつをダウンロードして導入。
  2. X11という名前でユーティリティの中に導入されてるので起動しておく。
  3. macのsshdの設定変更
    • /etc/ssh_configの2箇所の設定変更 「Host」の方は自分の環境はそのままでOKだった。
/etc/ssh_config
$ vi /etc/ssh_config
  #  Host *
  Host *
  #  ForwardX11 no
  ForwardX11 yes
  1. sshのXCオプションでアクセス
$ ssh -XC user@[ip or host] -p port
  1. Xアプリを起動

Windows

Teraterm + Xming

昔はcygwin入れないと出来なかった記憶があるが、いいものが出てたのね。

  1. Teratermの[設定]-[SSH転送]にて「SSHポート転送」というウィンドウが表示されるので、その中の「Xクライアントアプリケーションの転送」にチェックを入れる。
  2. Teratermの設定の保存(Teraterm.ini上書き)
  3. Xming導入し起動しておく
  4. Teratermで鯖にアクセス
  5. Xアプリを起動

<途中>

47
53
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
47
53