From owner-FreeBSD-users-jp@jp.FreeBSD.org Sun May  5 09:14:15 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g450EFm56457;
	Sun, 5 May 2002 09:14:15 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from ml001.gate01.com ([61.122.115.133])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with SMTP/inet id g450EFf56452
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Sun, 5 May 2002 09:14:15 +0900 (JST)
	(envelope-from ginga@ginganet.org)
Received: from athena.ginganet.org (tk0008-202x210x243x26.ap-TK.usen.ad.jp[202.210.243.26])
	by ml001.gate01.com;
	Sun, 5 May 2002 09:14:09 +0900
Received: by athena.ginganet.org (Postfix, from userid 5003)
	id 7BAD83E18; Sun,  5 May 2002 09:14:09 +0900 (JST)
Date: Sun, 5 May 2002 09:14:09 +0900
From: Kawaguti Ginga <ginga-freebsd@ginganet.org>
To: FreeBSD-users-jp@jp.FreeBSD.org
Message-ID: <20020505001409.GA1156%ginga-freebsd@ginganet.org>
References: <20020502145257.A93638@ns.manba.gr.jp> <lxr8kv105i.wl@dolphin.be.to> <20020502145257.A93638@ns.manba.gr.jp> <lxr8kv105i.wl@dolphin.be.to> <20020503030555.GG15810%ginga-freebsd@ginganet.org> <20020505035539.A3450@ns.manba.gr.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
Content-Disposition: inline
In-Reply-To: <20020505035539.A3450@ns.manba.gr.jp>
User-Agent: Mutt/1.3.27i-ja.2
Reply-To: FreeBSD-users-jp@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020417
X-Sequence: FreeBSD-users-jp 68341
Subject: [FreeBSD-users-jp 68341] Re: OpenSSH(ssh)
 =?ISO-2022-JP?B?GyRCJE4laiViITwlSCUzJV4lcyVJJEckThsoQg==?=
 sh =?ISO-2022-JP?B?GyRCTyJKOBsoQg==?= 
Errors-To: owner-FreeBSD-users-jp@jp.FreeBSD.org
Sender: owner-FreeBSD-users-jp@jp.FreeBSD.org
X-Originator: ginga-freebsd@ginganet.org

$B@n8}$G$9(B

In Sun, May 05, 2002 at 03:55:39AM +0900,
Shoji Kuzukami <kuzukami@manba.gr.jp> wrote:
> > sh/bash $B$O;H$C$F$$$J$$$N$GJ,$+$j$^$;$s$,!$(B
> > zsh $BAj<j$@$H(B ssh -f remotehost 'printenv' $B$9$k$H(B
> 
> sh$B7O(B(z$B$b$=$&$G$9$,(B)$B$G$O!$(B($BBPOC;~$N$_!)$@$C$?$+$J(B)
> $B4D6-JQ?t(B ENV $B$r(B(.profile$BCf$G(B)$B@_Dj$7$F$d$k$H!$(B

$B$=$l$C$F(B ~/.profile $B$OFI$`$H$$$&0UL#$G$9$h$M(B?
man $B$rFI$`$H(B .profile $B$,HsBPOC%;%C%7%g%s$K$*$$$F(B
$BFI$^$l$k$H$O=q$+$l$F$$$J$$$7!$<B:]$=$N$h$&$J(B
$BF0:n$O$7$F$$$J$$5$$,$7$^$9!%(B

> . ${ENV}
> 
> $B$H$$$&F0:n$r%W%m%s%W%H$r=P$9$^$($K$d$C$F$/$l$k$=$&$G$9!%(B
> $B;d$N;H$C$F$$$k(Bshell$B$O!$(Bpdksh,sh$B$J$N$G$9$,!$(B
> $BF1$8$h$&$JF0:n$r$9$k$h$&$G$9!%(B

> $B$^$?!$%7%'%k$N=i4|2=$r9T$J$$$?$$>l9g$O!$(B
> ENV$B$N%U%!%$%kCf$K!$5-=R$7$F$/$@$5$$!$(B
> 
> $B$3$s$J$+$s$8$G(B man $B$K$b=q$$$F$"$j$^$9!%(B

$B$A$J$_$K(B jman sh $B$K$h$k$H(B
|     $B8E$$%P!<%8%g%s$N(B sh $B$H$O0[$J$j!"4D6-JQ?t(B ENV $B$G;XDj$7$?%9%/%j%W%H$,<B9T$5(B
|     $B$l$k$N$O!"BPOCE*%7%'%k$N8F$S=P$7;~$N$_$G$9!#$3$l$K$h$j!"$$$$2C8:$K=q$+$l(B
|     $B$?(B ENV $B%9%/%j%W%H$K5/0x$9$k!"4JC1$K?)$$$b$N$K$5$l$k$3$H$,B?$$M-L>$J%;%-%e(B
|     $B%j%F%#%[!<%k$,$U$5$,$l$?$3$H$K$J$j$^$9!#(B
$B$H$"$j$^$9$,(B...

source $BCf$b(B
/*
 * Main routine.  We initialize things, parse the arguments, execute
 * profiles if we're a login shell, and then call cmdloop to execute
$BN,(B
        if (argv[0] && argv[0][0] == '-') {
                state = 1;
                read_profile("/etc/profile");

'-' $B$,$D$/$N$OBPOC%;%C%7%g%s$N;~$K;H$o$l$kL>A0$8$c$J$+$C$?$+$7$i!%(B

# $B$3$3$N$3$H$@$H;W$&$1$I0c$C$F$$$?$i$4$a$s$J$5$$(B

> > "$BO"J8(B" $B$C$F(B 
> > 	command1;command2 args;command3 arg2 arg3
> > $B$J$s$F8@$&$N$r;X$7$F$$$k$N$G$7$g$&$+(B?
> $B$=$&$G$9!%(B
> 
> > $B$3$l$bLdBj$J$/<B9T$G$-$k$N$G$9$,(B...
> > $BJQ?t$N%;%C%H$d$i$b4^$a$F(B...
> 
> $B$=$&$G$9$+!%(B
> $B$&$&$s!$;d$N=q$-$+$?$,$^$:$+$C$?$N$G$7$g$&$+!)(B
> $B$b$7$h$1$l$P!$F~NO$H=PNO7k2L$r$*4j$$$G$-$^$;$s$+!)(B
> zsh$B$J$i(BOK $B$J$N$G$7$g$&$+!)(B

ash $B$r(B login shell $B$H$9$k%f!<%6!<$r$D$/$C$F$_$^$7$?!%(B

% ssh -l gingash localhost 'grep gingash /etc/passwd;export HOGE="";printenv'
gingash@athena.ginganet.org's password: 
gingash:*:5003:5000:Kawaguti Ginga:/home/ginga:/bin/sh
HOGE=
SSH_CLIENT=xx.xx.xx.xx 922 22
USER=gingash
MAIL=/var/mail/gingash
HOME=/home/ginga
LOGNAME=gingash
BLOCKSIZE=K
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/ginga/bin
SHELL=/bin/sh
FTP_PASSIVE_MODE=YES

$B>e5-$NDL$j!$4D6-JQ?t@_Dj$b=PMh$F$$$^$9!%(B
$B$?$@$7!$(B.shrc/.profile $B$O3N$+$KFI$_9~$^$l$F$$$J$$$h$&$G$9!%(B
($B>e5-$N4D6-JQ?tCf(B "$B$J$s$@$m(B" $B$JE[$O(B login.conf $BM3Mh$_$?$$$G$9(B)

$BO"J8$K$D$$$F$OJL$K(B zsh $B$K8B$i$J$$$h$&$G$9$,(B...

# $B$A$J$_$K(B zsh $B8GM-$N@_Dj%U%!%$%k$K(B .zshenv $B$,$"$k$N$O(B
# $BA02s=q$$$?DL$j(B

> $B$D$^$j!$K>$s$G$$$k%j%b!<%H%[%9%H$G$N%3%^%s%I$O!$(B
> DISPLAY=10.10.10.50:0 . ./profile; exec ssh-agent twm
> $B$H$+$K$J$j$^$9!%(B

$B$G!$(BDISPLAY$B$N(B export $B$K4X$7$F$O4{$K%D%C%3%_$,Mh$F$$$kDL$j$G$9$,(B
ssh-agent $B$r$o$6$o$68F$S5/$3$7$F$$$k$N$O$J$<(B?
$B<+F0E*$K5/$-$k$O$:$G$9$h$M(B...
-- 
       $B"J"J(B
Zzz.. (- - )$B"^"^"=!A(B           $B@n8}(B $B6d2O(B
      ##############   ginga-freebsd@ginganet.org
