OpenVZ Forum


Home » General » Support » *SOLVED* Enable SSH by default after reboot?
*SOLVED* Enable SSH by default after reboot? [message #6269] Wed, 13 September 2006 06:05 Go to next message
skatewhale is currently offline  skatewhale
Messages: 9
Registered: August 2006
Location: Toronto
Junior Member
Hi everyone,
I have created a VPS with the Gentoo template, however whenever I tries to reboot, the SSH service is not started by default. I had to manually start it everytime, how can I set it to start automatcially after reboot?

Also when I type reboot in the ssh of the VPS, it just shuts down and doesn't boots up at all. I have specifically added ALLOWREBOOT=”yes” into the VPS configuration file.
and this is the contents in my /cron.d/vpsreboot file:
*/1 * * * * root /usr/share/vzctl/scripts/vpsreboot

I really can't think of anything wrong with it.
Please help!
Thanks a million!

[Updated on: Thu, 14 September 2006 07:15] by Moderator

Report message to a moderator

Re: Enable SSH by default after reboot? [message #6273 is a reply to message #6269] Wed, 13 September 2006 07:28 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
For me usual
rc-update  -a sshd default

helps.

Quote:

Also when I type reboot in the ssh of the VPS, it just shuts down and doesn't boots up at all

It's normall behaviour. All templates work so.

HTH.
Re: Enable SSH by default after reboot? [message #6303 is a reply to message #6273] Wed, 13 September 2006 20:33 Go to previous messageGo to next message
skatewhale is currently offline  skatewhale
Messages: 9
Registered: August 2006
Location: Toronto
Junior Member
Thank you vass! it worked!
So there is no way to reboot the VPS from the Shell inside the VPS without typing restart in the physical node?
Are there any control panels that solved this problem?
Thank you for your help!
Re: Enable SSH by default after reboot? [message #6322 is a reply to message #6303] Thu, 14 September 2006 07:15 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

So there is no way to reboot the VPS from the Shell inside the VPS without typing restart in the physical node?


You're right... During reboot init of VE is killed and nobody can give birth to new init.

Quote:

Are there any control panels that solved this problem?


Sorry, but I don't know any...

There is a solution however. And it even works for some templates! Very Happy

VE on runlevel 6 (reboot) creates file, that indicates that restart happened. Thus we can create cron job, that will go through all mounted (but not started) VEs and if the "indicator" file exist - start VE.

By default vzctl goes with file
/etc/cron.d/vpsreboot that every 5 minutes invokes
/usr/share/vzctl/scripts/vpsreboot

For FC4 ob HN and FC4 in VE it works.

Problems persist while different distiubutions/templates are tuned differently:
1) Your crond on HN should use /etc/cron.d/vpsreboot.
2) Your VE template should create indicator file.

However, these problems can simply be solved by hand.

HTH,
vass.
Re: Enable SSH by default after reboot? [message #6376 is a reply to message #6322] Fri, 15 September 2006 04:38 Go to previous message
skatewhale is currently offline  skatewhale
Messages: 9
Registered: August 2006
Location: Toronto
Junior Member
Hi Vass, thank you very much for your help! I found out that the default settings for the cron reboot works on fedora, centos and openSUSE templates Smile but I am having trouble doing it in Gentoo. Do you know what files I should change/add for the Gentoo templates? I have posted another post about this Smile
Thank you again Vass, I really appreciate your help!
Previous Topic: Problem with installing openvz on debian
Next Topic: *SOLVED* RHEL4 install problem
Goto Forum:
  


Current Time: Tue Aug 13 12:23:23 GMT 2024

Total time taken to generate the page: 0.02857 seconds