xhost(1)の使用例

xhost(1)の使い方の例。

概要

Xサーバへのアクセス制御を設定するコマンドツール。

使い方

現在のアクセス制御状態を確認(初期状態)
# xhost
access control enabled, only authorized clients can connect
SI:localuser:root
アクセス制御を無効化
# xhost +
access control disabled, clients can connect from any host
# xhost
access control disabled, clients can connect from any host
SI:localuser:root
アクセス制御を有効化
# xhost -
access control enabled, only authorized clients can connect
ホスト'192.168.1.1'を一覧に登録
# xhost +192.168.1.1
192.168.1.1 being added to access control list
# xhost
access control enabled, only authorized clients can connect
INET:192.168.1.1
SI:localuser:root
ホスト'192.168.1.1'を一覧から削除
# xhost -192.168.1.1
192.168.1.1 being removed from access control list
# xhost
access control enabled, only authorized clients can connect
SI:localuser:root
以上

コメント