Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I just installed a fresh ubuntu server 12.04. I log in over SSH and use sudo -s to get root access. Then I use shutdown now and the server closes the connection. I cannot access the server over SSH, FTP or HTTP anymore, it appears to be off. But it isn't. The server stays on, without being useful. Why? How can I shutdown the server with SSH?

share|improve this question

marked as duplicate by Eliah Kagan, qbi, Luis Alvarado, AgentCool, Seth Feb 7 '13 at 19:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Possible dulpicate of askubuntu.com/questions/205674/… –  Kevin Bowen Feb 4 '13 at 9:51
    
no, rebooting does work –  Camil Staps Feb 4 '13 at 10:05
1  
I don't think this issue has anything to do with SSH. It just seems stuck in the shutdown procedure somewhere, or, the ACPI command isn't perfoming an actual power off (just a halt). Do you have physical access to a console of that server to clarify? (or remote-KVM, serial console, etc.) Oh, and have you tried adding the -h flag to shutdown like this? shutdown -h now –  gertvdijk Feb 4 '13 at 10:36
    
It shouldn't be stuck, it's a clean installation with only LAMP installed. shutdown -h now works (as does poweroff, mentioned in the first answer) –  Camil Staps Feb 5 '13 at 9:30

1 Answer 1

up vote 3 down vote accepted

You can try this command over SSH:

sudo poweroff
share|improve this answer
    
Also you can specify password: ssh user@host 'echo password | sudo -S poweroff' –  dds Feb 4 '13 at 11:10
    
It's generally not a good idea to specify passwords in commands like that (plain text). I've removed the SSH part from your question as the poweroff part is what it is about (and a good suggestion). Removed my earlier comment crititizing that now. +1 –  gertvdijk Feb 4 '13 at 11:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.