hns - 日記自動生成システム - Version 2.19.9

先月 2006年01月 来月
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2006年01月18日(水) 旧暦 [n年日記] [更新:"2006/01/18 13:20:48"]

#1 [pkgsrc][NetBSD][ssh] ssh_askpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory

2003/10/04 の日記 を見て
   106  10:21   cd /export/pkgsrc/security/ssh-askpass/
   107  10:21   cvs update
   109  10:21   sudo make package
..
cc -o x11-ssh-askpass -O2 -L/usr/pkg/lib -L/usr/X11/lib
drawing.o dynlist.o resources.o x11-ssh-askpass.o -lXt -lX11
-lSM -lICE -L/usr/X11/lib -Wl,-rpath,/usr/pkg/lib:/usr/X11/lib
make: don't know how to make x11-ssh-askpass.man. Stop

make: stopped in /export/pkgsrc/security/ssh-askpass/work.st4200/x11-ssh-askpass-1.0
*** Error code 2

Stop.
make: stopped in /export/pkgsrc/security/ssh-askpass
===> 
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /export/pkgsrc/security/ssh-askpass/work.st4200/.work.log
===> 
*** Error code 1

Stop.
make: stopped in /export/pkgsrc/security/ssh-askpass
ttyp0:makoto@st4200 10:22:14/060118(...security/ssh-askpass)> 
interim fix, disable requiring ssh-askpass.0 (which is not listed in PLIST)
ttyp0:makoto@st4200 10:30:08/060118(...security/ssh-askpass)> \
? diff -u work.st4200/x11-ssh-askpass-1.0/Makefile{-orig,}
--- work.st4200/x11-ssh-askpass-1.0/Makefile-orig       2006-01-18 10:22:08.000000000 +0900
+++ work.st4200/x11-ssh-askpass-1.0/Makefile    2006-01-18 10:29:35.000000000 +0900
@@ -694,7 +694,7 @@
        $(MKDIRHIER) $(DESTDIR)$(BINDIR)
        $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS)  $(NAME) $(DESTDIR)$(BINDIR)/$(NAME)
 
-all:: $(NAME).0
+# all:: $(NAME).0
 
 $(NAME).0:: $(NAME).man
        @if [ -f $(NAME).man ]; \
ttyp0:makoto@st4200 10:30:18/060118(...security/ssh-askpass)> sudo make package
PR/11320

上の問題は未解決だが ssh-agent を使っていれば:

これは聞いて来ないので、放置とする。

#2 xdm で ssh-agent を使う

別件で、ssh-agent についてちょっと変なものを用意した。 xdm を使っていると、ssh-agent を起動してから X11 の窓を使うというのが しっくり来ない。そこで .xsession で ssh-agent を起動しておいて、後からそれを利用 するというのを考えて見た。次のような手続を使う。使い方は次の通り。
  1. .xsession の内で起動しておく ( ssh-start start)
  2. xterm の窓でもう一度起動。この時には普通は環境変数だけを設定する
  3. どこかの xterm で一回だけ ssh-add しておく
一応 csh/tcsh 専用
#!/bin/csh
# csh/tcsh environment ONLY

# this command is to be used on two different way:
# [1]  server mode
#      csh this-command start

#      just start ssh-agent, to be called by .xsession, for example.

# [2]  client mode
#      eval `this-command`
#      ssh-add

#      in xterm, eval `this-command` to set environment variable for
#      later ssh-add command

# getting process id of 'SSH-agent -c'
# (1) get ps ax list
# (2) exclude its own process from that
# (3) remove leading space (from the output)
# (4) get the very first token (number) deliminated by ' '


set SSH = `ps ax | grep -v grep | grep 'ssh-agent -c' | sed 's/^ *//'| cut -d ' ' -f 1`
echo 'echo' '##' ${SSH} '##'

# start ssh-agent unless already running
if ( .${SSH} == . ) then
        eval `ssh-agent -c`
else
        echo '##' ssh-agent already running ';'


if (.$1 == .start) exit
# followin code will not be executed if the argument is 'start'

## get SOCK pipe file on /tmp, should exist only one instance
set SOCK = `/bin/ls /tmp/ssh-*/agent.*`

# echo command line to be processed by  eval `this-command`
echo setenv SSH_AUTH_SOCK ${SOCK} ';'
echo setenv SSH_AGENT_PID ${SSH}  ';'

echo echo SSH_AUTH_SOCK,SSH_AGENT_PID now set, issue ssh-add only once to really activate
endif
安全(security)度は ? unix 許可に依存。 別に .xsession で起動しなくても xterm で起動すれば同じかな (でも自動で起動しておいてくれるというのが有難い)。... どうせ一回は必要だから、 回数は減らない ?

これにより、 xterm を開く。eval `~/bin/ssh-start` する。だけで、その後は 何も聞かれないで ssh が使える。

eval と source の違い:

eval と source の違いを手早く説明出来ないなぁ。 目的語が文字列か譜名かという違いかな。



最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)