[CentOS] It works now -- RE: trying to run sshd daemon in kickstart environment

Wed May 23 21:39:03 UTC 2007
Guolin Cheng <guolin at alexa.com>

Hi,

 Thanks a lot for so many helpful responses. 

 The fix is pretty straight: just mount /dev/pts again at the chrooted
%post environment where my original sshd fires up from.

 One command 'Mount -t devpts -o rw,gid=5,mode=620 devpts /dev/pts' or
just a bare 'mount /dev/pts' command fix the problem since the devpts
entry is in fstab already.

 I also hacked image stage2.img to include sshd daemon binary, libraries
and configuration files, and fire up the ssh daemon at the first line of
%pre script section. Then disable my original fired up sshd daemon at
%post section.

Now kickstart environment is not 'dump' at all -- I can kick into and
monitor the kickstart clients any time and stop run-away kickstart
processes with 'reboot' command immediately should my home directory
server upgrade turn into a disaster.

--Guolin



-----Original Message-----
From: kickstart-list-bounces at redhat.com
[mailto:kickstart-list-bounces at redhat.com] On Behalf Of Chris Edillon
Sent: Tuesday, May 22, 2007 9:42 AM
To: Discussion list about Kickstart
Cc: centos at centos.org
Subject: Re: trying to run sshd daemon in kickstart environment

On Mon, 2007-05-21 at 10:54 -0700, Guolin Cheng wrote:

>   I tried to make kickstart environment a little bit more charming by
> firing up openssh daemon in the limited environment. I edited/checked
> a bunch of files and almost succeeded but still not.
> 
>   I can reach the machine to run a command like 'ssh -x
> <kickstartClient> <command>' and it does work for %pre and both chroot
> and non-chroot %post sections, in fact, you can run a command on
> kickstartClient through ssh connections without problems.  But it
> still fails because I can not ssh into the kickstartClient to get a
> local command shell. 
> 
>  In short, 'ssh -x <kickstartClient>' fails, 'ssh -x <kickstartClient>
> <command>' works.
> 
>  Any one has succeeded in this topic? Life will be much happier if we
> can freely turn on/off sshd daemon for Kickstart environment. Thanks.

  you may need to force ssh to allocate a pseudo-tty,
try "ssh -t -x <ksClient>".  the -t option is described
in the ssh manpage.

chris


_______________________________________________
Kickstart-list mailing list
Kickstart-list at redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list