Is it possible to remotely force a reboot on Ubuntu 20.04.3?

Robert Heller heller at deepsoft.com
Mon Feb 21 16:22:46 UTC 2022


At Mon, 21 Feb 2022 16:08:20 +0100 bo.berglund at gmail.com, "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> On Mon, 21 Feb 2022 15:44:21 +0100, Bo Berglund <bo.berglund at gmail.com> wrote:
> 
> >So it seems like it is in real need of a restart...
> >
> >But is it possible to force such when the situation is as described?
> >
> 
> I have tried this from
> https://www.cyberciti.biz/faq/remote-shutdown-linux-computer-from-the-cli/
> 
> $ ssh -t bosse at aspomint 'sudo reboot'
> ssh_exchange_identification: Connection closed by remote host
> 
> So even this fails...

Try:

telnet aspomint 22

(you might have to do an 'apt install telnet' to get the telnet command)

This will test to see if the machine is listening on port 22 -- if not, sshd 
crashed, *BUT* if it is listening on port 22, then

slogin -v bosse at aspomint

Should give you an idea as to why ssh is not working.

Possiblities include a disk problem (/home is in trouble) or sshd is 
overloaded (ddos attack) or fail2ban has been triggered for your IP.

Question: does root itself have a legit password (by default Ubuntu disables 
loging in as root directly, by giving root an "invalid" password)?  If root 
has a valid passord (or you have placed a SSH public key in 
~root/.ssh/authorized_keys), then you can try:

slogin root at aspomint

> 
> 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                                          




More information about the ubuntu-users mailing list