2014年12月23日火曜日

ssh -X 、起動時実行



p1<----------------------------------------------------p2
ssh server



SSHDサーバP1を
 ./comment-out.bat /etc/ssh/sshd_config

PermitRootLogin no
AuthorizedKeysFile    .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
X11UseLocalhost no
  #こうしないとP2ではなくP1側でchromiunがたちあがる
PrintMotd no # pam does that
UsePrivilegeSeparation sandbox        # Default for new installations.
Subsystem    sftp    /usr/lib/ssh/sftp-server



とします。


それから インターネット越しに P2から
ssh -X  user-1@example.mydns.jp
して P1に入り、

export XMODIFIERS=@im=ibus
ibus-daemon &

そして
chromium
をすると 
p2の上でchromiumが立ち上がります。



起動時実行
cronieをいれて

root で crontab -e 
して

 EXTENSIONS
       These special time specification "nicknames" which replace the  5  ini‐
       tial time and date fields, and are prefixed with the '@' character, are
       supported:

       @reboot    :    Run once after reboot.
       @yearly    :    Run once a year,  ie.  "0 0 1 1 *". 1/1 0:0
       @annually  :    Run once a year,  ie.  "0 0 1 1 *".
       @monthly   :    Run once a month, ie.  "0 0 1 * *".   1 0:0
       @weekly    :    Run once a week,  ie.  "0 0 * * 0".   s 0:0
       @daily     :    Run once a day,   ie.  "0 0 * * *".     0:0
       @hourly    :    Run once an hour, ie.  "0 * * * *".       0
                                                m h d m

              minute         0-59
              hour           0-23
              day of month   1-31
              month          1-12 (or names, see below)
              day of week    0-7 (0 or 7 is Sunday, or use names)



@reboot /home/ttt/nginx.bat
するといいらしい。




0 件のコメント:

コメントを投稿