starting services

2010-07-22 Thread Andreas Constantinides (MegaHz)

hi guys,

got a question on ubuntu you might know the answer.

I have noticed that on the new versions of ubuntu, when ubuntu boots it does 
not activate any services until you login.

So nothing starts, no sshd nothing. After you login on the machine, then it 
starts all services.

so if you remotely restart the machine there is no way to have ssh again until 
you visit the machine and login to it.

thanks

-- Andreas



Re: starting services

2010-07-22 Thread Theodotos Andreou
I just installed openssh-server:

sudo aptitude install openssh-server

Verify it:

u...@userpc:~$ sudo netstat -lnptu | grep ssh
[sudo] password for user: 
tcp0  0 0.0.0.0:22  0.0.0.0:*
LISTEN  991/sshd
tcp6   0  0 :::22   :::*
LISTEN  991/sshd

Reboot

sudo reboot

And logged in successfully from another PC without to login on the
target pc first.

But I have a suspicion what is the problem. There is no ssh symlink
under /etc/rc2.d/ to point to /etc/init.d/ssh. The script is started
instead from /etc/network/if-up.d/openssh-server which works when the
network comes up. For some reason your network dows not come up when the
PC is started but only when you login. This usually happens because of
Network Manager.

There are two possible workarounds:

1) Append the following to /etc/network/interfaces:

auto eth0
iface eth0 inet dhcp

2) Create a symlink to /etc/init.d/ssh under /etc/rc2.d:

cd /etc/rc2.d
ln -s ../init.d/ssh S40ssh

On Thu, 2010-07-22 at 14:56 +0100, Andreas Constantinides (MegaHz)
wrote:
> hi guys,
> 
> got a question on ubuntu you might know the answer.
> 
> I have noticed that on the new versions of ubuntu, when ubuntu boots it does 
> not activate any services until you login.
> 
> So nothing starts, no sshd nothing. After you login on the machine, then it 
> starts all services.
> 
> so if you remotely restart the machine there is no way to have ssh again 
> until you visit the machine and login to it.
> 
> thanks
> 
> -- Andreas
>