[opensuse] Reboot via SSH
![](https://seccdn.libravatar.org/avatar/065b1b1774363493af32c0a6ce9ff07c.jpg?s=120&d=mm&r=g)
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot! Can anyone tell me why and how to reboot a system remotely? I tried via VNC also, no joy... Marc.. -- "The Truth is out there" - Spooky -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Mon, 08 Aug 2011 17:19:45 -0700 Marc Chamberlin <marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Can anyone tell me why and how to reboot a system remotely? I tried via VNC also, no joy...
Marc..
Hi Marc, Due to the security implications, I always disable remote root logins. I leave one regular user account enabled that can then be used to 'su' to root as required. With that out of the way... Here's the command I use to reboot: #~> init 6 hth & regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/abdee805d4df05af9a496107100c582c.jpg?s=120&d=mm&r=g)
* Carl Hartung <opensuse@cehartung.com> [08-08-11 20:51]:
On Mon, 08 Aug 2011 17:19:45 -0700 Marc Chamberlin <marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Can anyone tell me why and how to reboot a system remotely? I tried via VNC also, no joy...
Due to the security implications, I always disable remote root logins. I leave one regular user account enabled that can then be used to 'su' to root as required. With that out of the way...
Here's the command I use to reboot:
#~> init 6
That's what I do, also. -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/c0deb892c8d6a59d3eb4b475c3d9c9dc.jpg?s=120&d=mm&r=g)
On Mon, Aug 8, 2011 at 6:19 PM, Marc Chamberlin <marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Just tested from my desktop to my laptop and the command "reboot" works fine. Have you looked at the log files? "/var/log/messages" for example. To see which log files were written most recently run "ls -lrt". -- Carlos F Lange -- Recursive: Adj. See Recursive. -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Tue, 9 Aug 2011 00:30:34 -0600 Carlos Frederico Lange <carlosflange@gmail.com> wrote:
On Mon, Aug 8, 2011 at 6:19 PM, Marc Chamberlin <marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Just tested from my desktop to my laptop and the command "reboot" works fine. Have you looked at the log files? "/var/log/messages" for example. To see which log files were written most recently run "ls -lrt".
Interesting ... On my 11.4 system "reboot" is symlinked to /sbin/halt: linux:/sbin # ls -al reboot lrwxrwxrwx 1 root root 4 Jul 13 04:38 reboot -> halt In any case, I learned several years ago with SuSE to use the init system for ad hoc run level selections because it is tightly integrated into the distribution. For example, 'init 0' gracefully brings the system down and powers it off. 'init 6' does the same thing except the system is restarted (will boot to the default run level.) 'init 1' boots/drops to single user mode for certain maintenance items. 'init 2' gives you multiuser mode without networking. I'm sure you're already familiar with 'init 3' (run level 3) and 'init 5' (run level 5) regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/8434092a3798a0467c3f2371ef030fc6.jpg?s=120&d=mm&r=g)
On 8/9/2011 3:04 AM, Carl Hartung wrote:
On Tue, 9 Aug 2011 00:30:34 -0600 Carlos Frederico Lange<carlosflange@gmail.com> wrote:
On Mon, Aug 8, 2011 at 6:19 PM, Marc Chamberlin <marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Just tested from my desktop to my laptop and the command "reboot" works fine. Have you looked at the log files? "/var/log/messages" for example. To see which log files were written most recently run "ls -lrt".
Interesting ...
On my 11.4 system "reboot" is symlinked to /sbin/halt:
linux:/sbin # ls -al reboot lrwxrwxrwx 1 root root 4 Jul 13 04:38 reboot -> halt
In any case, I learned several years ago with SuSE to use the init system for ad hoc run level selections because it is tightly integrated into the distribution. For example, 'init 0' gracefully brings the system down and powers it off. 'init 6' does the same thing except the system is restarted (will boot to the default run level.) 'init 1' boots/drops to single user mode for certain maintenance items. 'init 2' gives you multiuser mode without networking. I'm sure you're already familiar with 'init 3' (run level 3) and 'init 5' (run level 5)
I only ever use "shutdown", ie, "shutdown -r now" and don't have any problem. I believe that is the defined "most correct, most graceful" way in the manual even though several others should usually work well enough. This is true for most os's although the syntax of the command itself changes from os to os. Recently I noticed an employee had been using "reboot", which I never use because on SCO Unix "halt" and "reboot" are lower level and not very graceful, but it seems to be ok on Suse. You're not even supposed to call init directly on sco, technically you're supposed to use "telinit", when for whatever reason you're not using "shutdown" like you're really supposed to. And the meanings of runlevels aren't necessarily written in stone either. They're written in /etc/inittab which anyone may edit. "init 6" could theoretically not actually mean reboot, but "shutdown -r" always will. Definitely the meaning of "Full multi-user, with networking, without X" is different between some os's. It's init 3 for linux but init 2 for sco unix. That's for normal times of course. If something is wrong like for the OP, maybe then you specifically have to escalate to the less graceful options. Also, as a last ditch effort, you can enable magic sysrq keys and use them remotely by echoing strings into /proc files. By remotely, I mean, anything that will write to files, not necessarily a telnet or ssh login session. You could for instance have a cgi that does it and hit that cgi via http, or have a special share configured in rsync or nfs or samba or ftp. But for a one-time problem, since you can ssh then of course just do that. http://wiki.openvz.org/Magic_SysRq_Key -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/88710aea1902fe935eb6524013e4b42c.jpg?s=120&d=mm&r=g)
On 10/08/11 02:01, Brian K. White wrote:
On 8/9/2011 3:04 AM, Carl Hartung wrote:
On Tue, 9 Aug 2011 00:30:34 -0600 Carlos Frederico Lange<carlosflange@gmail.com> wrote:
On Mon, Aug 8, 2011 at 6:19 PM, Marc Chamberlin <marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Just tested from my desktop to my laptop and the command "reboot" works fine. Have you looked at the log files? "/var/log/messages" for example. To see which log files were written most recently run "ls -lrt".
Interesting ...
On my 11.4 system "reboot" is symlinked to /sbin/halt:
linux:/sbin # ls -al reboot lrwxrwxrwx 1 root root 4 Jul 13 04:38 reboot -> halt
In any case, I learned several years ago with SuSE to use the init system for ad hoc run level selections because it is tightly integrated into the distribution. For example, 'init 0' gracefully brings the system down and powers it off. 'init 6' does the same thing except the system is restarted (will boot to the default run level.) 'init 1' boots/drops to single user mode for certain maintenance items. 'init 2' gives you multiuser mode without networking. I'm sure you're already familiar with 'init 3' (run level 3) and 'init 5' (run level 5)
I only ever use "shutdown", ie, "shutdown -r now" and don't have any problem. I believe that is the defined "most correct, most graceful" way in the manual even though several others should usually work well enough. This is true for most os's although the syntax of the command itself changes from os to os.
Recently I noticed an employee had been using "reboot", which I never use because on SCO Unix "halt" and "reboot" are lower level and not very graceful, but it seems to be ok on Suse. You're not even supposed to call init directly on sco, technically you're supposed to use "telinit", when for whatever reason you're not using "shutdown" like you're really supposed to. And the meanings of runlevels aren't necessarily written in stone either. They're written in /etc/inittab which anyone may edit. "init 6" could theoretically not actually mean reboot, but "shutdown -r" always will. Definitely the meaning of "Full multi-user, with networking, without X" is different between some os's. It's init 3 for linux but init 2 for sco unix.
Has noone read the manpages? man halt: " If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it's running normally, shutdown will be invoked instead (with the -h or -r flag). For more info see the shutdown(8) manpage. " and furthermore: man shutdown: " shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the default if neither the -h or -r flag is given to shutdown. " So everyone arguing about the best way to shutdown/reboot is actually doing the EXACT SAME THING. Regards, Tejas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Wed, 10 Aug 2011 07:47:45 +0100 Tejas Guruswamy <tejas.guruswamy@opensuse.org> wrote: <snipped>
Has noone read the manpages?
man halt:
" If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it's running normally, shutdown will be invoked instead (with the -h or -r flag). For more info see the shutdown(8) manpage. "
and furthermore:
man shutdown: " shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the default if neither the -h or -r flag is given to shutdown. "
So everyone arguing about the best way to shutdown/reboot is actually doing the EXACT SAME THING.
Regards, Tejas
Hi Tejas, For the record, I haven't been "arguing" at all. I merely responded to a post describing badly behaving "reboot" and "shutdown" commands and asking for suggestions. I have personally deduced over a long period of time and covering innumerable SuSE > openSUSE installations that, for whatever reason or reasons, and these are indisputably likely installation-specific factors, "reboot" and "shutdown" simply do not "just work" and have never "just worked" as reliably for me as "init". Yes, I've RTFM many times and worked diligently over the years to resolve the anomalous behaviors, when encountered. In every case, falling back to "init" has resolved the issue. Eventually, I just quit experimenting with the others. I mean ... why bother? I am not a glutton for punishment so I use what "just works." I am not engaged in an academic exercise here. I use my systems to accomplish work. Getting bogged down in trivialities is a waste of my time. I never inferred that my approach would be suitable for any other distribution. I did not state that this is a "perfect" solution that ought to be adopted by everyone. I did not mistakenly suggest that the OP try "shutdown -h" to remotely restart his system, as someone else did who took issue with my approach. Hopefully, he succeeded with "init 6" as I recommended and has moved on with his life. Finally, I agree in theory that the commands in question are virtually identical. But the theory fails each time it encounters an 'anomalous' installation, which it inevitably and incontrovertibly does. regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/cabdbf4d350ab6a15265803acab1634d.jpg?s=120&d=mm&r=g)
Carl Hartung said the following on 08/10/2011 04:32 AM:
Finally, I agree in theory that the commands in question are virtually identical. But the theory fails each time it encounters an 'anomalous' installation, which it inevitably and incontrovertibly does.
+1 A recent kernel upgrade seems to have aggravated the problem on my laptop. GUI shutdown by logging out and using the option on KDM works more reliably but not 100%. Sometimes disks don't get unmounted. If I go to a console and shut down with 'shutdown -h now' it hangs about 20% of the time. Another 20% of the time it just shutdown without unmounting disks. The reliable way is to go "init 3", "init 1" login "umount -a" and then "init 0" It didn't used to be like this. Let me emphasise: The problem is intermittent. Phase of the moon? Proximity of Cats? -- An intellectual is a man who takes more words than necessary to tell more than he knows. Dwight D. Eisenhower -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Wed, 10 Aug 2011 08:01:25 -0400 Anton Aylward <opensuse@antonaylward.com> wrote:
Carl Hartung said the following on 08/10/2011 04:32 AM:
Finally, I agree in theory that the commands in question are virtually identical. But the theory fails each time it encounters an 'anomalous' installation, which it inevitably and incontrovertibly does.
+1
A recent kernel upgrade seems to have aggravated the problem on my laptop. GUI shutdown by logging out and using the option on KDM works more reliably but not 100%. Sometimes disks don't get unmounted.
If I go to a console and shut down with 'shutdown -h now' it hangs about 20% of the time. Another 20% of the time it just shutdown without unmounting disks.
The reliable way is to go "init 3", "init 1" login "umount -a" and then "init 0"
It didn't used to be like this.
Let me emphasise: The problem is intermittent.
Phase of the moon? Proximity of Cats?
Just to be clear on my position: The "init" recommendation I made to the OP was in response to his specific difficulties running "reboot" and "shutdown" on a remote system. I've had no need to run "init" on my own 11.4 installation because everything is "just working" as it should <knock on wood>. In fact, this is easily the most trouble free openSUSE installation I've ever run. So, in your case, Anton, I would definitely investigate further. There are probably plenty of clues in the logs. regards, Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/247f3737bfdd07c80a5411399e9a504c.jpg?s=120&d=mm&r=g)
Tejas Guruswamy wrote:
So everyone arguing about the best way to shutdown/reboot is actually doing the EXACT SAME THING.
I think everybody that believes this nonsense should read the source. init.c is 2898 lines and does something. shutdown.c is 762 lines and strangely enough, it does something different, not just call init. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/8434092a3798a0467c3f2371ef030fc6.jpg?s=120&d=mm&r=g)
On 8/10/2011 9:03 AM, Dave Howorth wrote:
Tejas Guruswamy wrote:
So everyone arguing about the best way to shutdown/reboot is actually doing the EXACT SAME THING.
I think everybody that believes this nonsense should read the source.
init.c is 2898 lines and does something. shutdown.c is 762 lines and strangely enough, it does something different, not just call init.
ding ding ding -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Wed, 10 Aug 2011 10:14:34 -0400 "Brian K. White" <brian@aljex.com> wrote:
On 8/10/2011 10:07 AM, Dave Howorth wrote:
Brian K. White wrote:
ding ding ding
Yes, sorry for my grumpiness popping through :)
No I highly approved!
You guys don't know when to stop, do you? Everyone knows there's very little correlation between the character count, word count, line lenght or byte size of a program file and it's function. bye -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/8434092a3798a0467c3f2371ef030fc6.jpg?s=120&d=mm&r=g)
On 8/10/2011 10:53 AM, Carl Hartung wrote:
On Wed, 10 Aug 2011 10:14:34 -0400 "Brian K. White"<brian@aljex.com> wrote:
On 8/10/2011 10:07 AM, Dave Howorth wrote:
Brian K. White wrote:
ding ding ding
Yes, sorry for my grumpiness popping through :)
No I highly approved!
You guys don't know when to stop, do you?
Everyone knows there's very little correlation between the character count, word count, line lenght or byte size of a program file and it's function.
bye
This is so silly it doesn't bear even dignifying with a response. Then again I often lack dignity so... Everyone knows there's very little correlation between opinions that don't refer to facts and reality. You, demonstrably, either didn't read or didn't understand the source referred to, and so are unqualified to make statements about what it does, might, or might not do, and by extension the possible ramifications of those to the rest of the system. Maybe the differences in behavior and the logic wrapped around the ultimate actions are beneath your personal radar. Heck I'm even willing to concede they are probably as good as imperceptible/inconsequential to me and most everyone else too practically every time. But that does NOT mean those differences don't exist or don't end up mattering sometime somewhere to somebody and exist for no reason. Even in those cases where shutdown does end up calling init, it does not "just" do that. It does it as a result of a bunch of tests and other logic and does so within a specific environment it just created for the purpose. There are times when it won't do that, and times when it will, but it either wont work or won't behave exactly the same as if you had run init manually from your fully loaded interactive root login session, or su or sudo. And of course, by openSUSE 12.1 or 12.2, it will be even more complicated and variable, since "init" may not even be init but systemd... But for now, the answers are all right here: http://download.opensuse.org/source/distribution/11.4/repo/oss/suse/src/sysv... -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Wed, 10 Aug 2011 13:08:10 -0400 "Brian K. White" <brian@aljex.com> wrote:
This is so silly it doesn't bear even dignifying with a response. <snipped>
You need a vacation, Brian. Your sarcasm.exasperated sensor is down. Really. Get some rest. Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/8434092a3798a0467c3f2371ef030fc6.jpg?s=120&d=mm&r=g)
On 8/10/2011 1:25 PM, Carl Hartung wrote:
On Wed, 10 Aug 2011 13:08:10 -0400 "Brian K. White"<brian@aljex.com> wrote:
This is so silly it doesn't bear even dignifying with a response. <snipped>
You need a vacation, Brian. Your sarcasm.exasperated sensor is down.
Really.
Get some rest.
Considering the things that get said around here, and around anywhere in general, I don't think it's at all unreasonable to assume that any given statement was intended to be a joke just because it was clearly idiotic. If I am guilty of not recognizing you personally as being outside that category and deserving more credit then I apologize for that. -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/e01b8e9d7672014c0a2b6cf5b65a67e6.jpg?s=120&d=mm&r=g)
Brian, Carl, can both of you be this nice and stop bitching each other on list? Pease share the joy of this list, of Open Source Software, of freedom and piece with us. Even if I'm part of the game. ;) Sleep well guys and don't hit the reply button again, please. Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany
![](https://seccdn.libravatar.org/avatar/247f3737bfdd07c80a5411399e9a504c.jpg?s=120&d=mm&r=g)
Carlos Frederico Lange wrote:
On Mon, Aug 8, 2011 at 6:19 PM, Marc Chamberlin <marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Just tested from my desktop to my laptop and the command "reboot" works fine. Have you looked at the log files? "/var/log/messages" for example. To see which log files were written most recently run "ls -lrt".
I regularly use shutdown -h now via ssh on my systems and it works. You don't say what system you're running so I couldn't begin to suggest why yours doesn't. I don't see why it should be necessary to use magic incantations like init 6. I agree with what Carlos suggests. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Tue, 09 Aug 2011 09:50:40 +0100 Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk> wrote:
I regularly use shutdown -h now via ssh on my systems and it works. You don't say what system you're running so I couldn't begin to suggest why yours doesn't. I don't see why it should be necessary to use magic incantations like init 6. I agree with what Carlos suggests.
"magic"? LOL!! Don't be silly! Which of the following requires the most "magic" to remember? a) init 0 to 5, where the argument corresponds to the run level or b) "reboot" with -n: don't sync before halting the system -w: only write a wtmp reboot record and exit. -d: don't write a wtmp record. -f: force halt/reboot, don't call shutdown. -h: put harddisks in standby mode. -i: shut down all network interfaces. or "shutdown" with -n: don't sync before halting the system -w: only write a wtmp reboot record and exit. -d: don't write a wtmp record. -f: force halt/reboot, don't call shutdown. -h: put harddisks in standby mode. -i: shut down all network interfaces. Not to mention your "-h" example is to put the hard disks in standby mode not to reboot, which was the OP's topic. Finally, I'm pretty sure I use init because I've found over time that it consistently yields the most reliable results. Of course, this is Linux so you are free to differ and choose your own medicine. bye Carl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a257fa0591438f3c6ad1c8bc48ce0fdc.jpg?s=120&d=mm&r=g)
On Tue, 9 Aug 2011 08:23:48 -0400 Carl Hartung <opensuse@cehartung.com> wrote: correction:
or
"shutdown" with
-a: use /etc/shutdown.allow -k: don't really shutdown, only warn. -r: reboot after shutdown. -h: halt after shutdown. -P: halt action is to turn off power. -H: halt action is to just halt. -f: do a 'fast' reboot (skip fsck). -F: Force fsck on reboot. -n: do not go through "init" but go down real fast. -c: cancel a running shutdown. -t secs: delay between warning and kill signal. ** the "time" argument is mandatory! (try "now") ** -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/247f3737bfdd07c80a5411399e9a504c.jpg?s=120&d=mm&r=g)
Carl Hartung wrote:
On Tue, 9 Aug 2011 08:23:48 -0400 Carl Hartung <opensuse@cehartung.com> wrote:
correction:
or
"shutdown" with
-a: use /etc/shutdown.allow -k: don't really shutdown, only warn. -r: reboot after shutdown. -h: halt after shutdown. -P: halt action is to turn off power. -H: halt action is to just halt. -f: do a 'fast' reboot (skip fsck). -F: Force fsck on reboot. -n: do not go through "init" but go down real fast. -c: cancel a running shutdown. -t secs: delay between warning and kill signal. ** the "time" argument is mandatory! (try "now") **
I'm glad you corrected yourself; that explains -r and -h so much better. Presumably you did that by reading the man page, which also explains why it's a good command to use. By contrast, the man page for init explains why to use shutdown, or possibly telinit, instead. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/eeaa070dd6317ec84ae2eb35d4eaf01f.jpg?s=120&d=mm&r=g)
On 08/09/2011 04:50 AM, Dave Howorth pecked at the keyboard and wrote:
Carlos Frederico Lange wrote:
On Mon, Aug 8, 2011 at 6:19 PM, Marc Chamberlin<marc@marcchamberlin.com> wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Just tested from my desktop to my laptop and the command "reboot" works fine. Have you looked at the log files? "/var/log/messages" for example. To see which log files were written most recently run "ls -lrt".
I regularly use shutdown -h now via ssh on my systems and it works. You don't say what system you're running so I couldn't begin to suggest why yours doesn't. I don't see why it should be necessary to use magic incantations like init 6. I agree with what Carlos suggests.
Cheers, Dave
Magic incantation? No magic involved with init. ?And the -h in your command is used to halt/stop the system *not* reboot. init 0 - shutdown the system init 1-5 - go to the specified run level init 6 - reboot the system As I said, no magic involved only knowledge. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/27aacf61a13c66fcc083fcf8a84823bc.jpg?s=120&d=mm&r=g)
On 08/08/2011 07:19 PM, Marc Chamberlin wrote:
I ssh'd into my home system as root without any problems. But when I give the command to reboot, nothing happens.. "shutdown -r now" also just gives a response saying the system is going down, but again it does not actually reboot!
Can anyone tell me why and how to reboot a system remotely? I tried via VNC also, no joy...
Marc..
Marc, Probably already answered, but if you have sudo enabled on the remote box, then it is just the simple matter of issuing a ssh call on your local box: ssh your.remote.box 'sudo shutdown -r now' I've always done it that way, I'll have to give the init 6 a try as well, but so far just issuing the sudo shutdown from the local box has worked well for years. (kernel updates are always a dice-roll) -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (12)
-
Anton Aylward
-
Brian K. White
-
Carl Hartung
-
Carlos Frederico Lange
-
Dave Howorth
-
David C. Rankin
-
James Knott
-
Ken Schneider - openSUSE
-
Lars Müller
-
Marc Chamberlin
-
Patrick Shanahan
-
Tejas Guruswamy