[clug] ssh terminal

David Deaves David.Deaves at dd.id.au
Tue Feb 10 05:45:37 GMT 2004


> On Tue, 10 Feb 2004, James McNeill wrote:
> 
> > is there any way to have a terminal start with an ssh connection at 
> > boot? 
> 
> Yep:
> 
> 5:2345:respawn:/usr/bin/ssh -l brettw freddo < /dev/tty5 > /dev/tty5 2>&1
> 
> Brett
> 

The problem with that is it will be running as root, and with HOME
undefined, storage of host_keys etc. may not be what you expect.

Better to create a dummy user (unpriveleged, no usable passwd '*')
who's shell is /usr/bin/ssh.

dummy:x:507:507:Dummy User for auto ssh:/home/dummy:/usr/bin/ssh

then

5:2345:respawn:/bin/su dummy brettw at freddo < /dev/tty5 > /dev/tty5 2>&1


Dave !


-- 
David Deaves	<David.Deaves at dd.id.au>		+61 413 003 552
"Luck is the residue of design"   -   Branch Rickey



More information about the linux mailing list