1

I have a remote computer which I currently cannot access with SSH. The computer responds to ping but SSH gives connection refused, so I suspect the ssh-server is not working for some reason.

What would be a reasonable alternative if something goes wrong with SSH in general?

I had a weird idea that would allow me to perform commands on the remote computer without SSH. I could have a bash script on my http-server that the remote machine would periodically download, say once a minute with cron, and always run this script. The file would be empty normally. The resulting output could be uploaded to the same server if needed.

But is there an easier way?

NOTE: I'm looking for a software solution compatible with Ubuntu 12.04.

  • What hardware are you using? Many servers have an implementation of 'lights out management' which allow you to control/access the server even when no OS is installed. – garethTheRed Aug 29 '14 at 8:15
  • Utilite Standard, i.e. miniature ARM Ubuntu desktop with i.mx6 chip. – lahjaton_j Aug 29 '14 at 8:19
  • 1
    Ah! I was expecting a monster server setup from Sun or HP :o. I wouldn't use your webserver/script idea though - it's hardly secure. You would be better with something that runs locally on the Utilite, checking the state of sshd and restarts the service if it fails. Maybe even reboots after a few failed attempts. – garethTheRed Aug 29 '14 at 8:24
  • Sorry for the unclear explanation, I'll update the question. Monitoring sshd and restarting would most likely work 90 % of the time, but does not work if openssh-server installation is broken for some reason. – lahjaton_j Aug 31 '14 at 14:07
0

I remember having used PHP shell to issue commands through a browser. You would not be able to manage remotly the power.

PHP Shell is a shell wrapped in a PHP script. It's a tool you can use to execute arbitrary shell-commands or browse the filesystem on your remote webserver. This replaces, to a degree, a normal Telnet connection, and to a lesser degree an SSH connection.

Better use https with that tool.

1

The professional approach is to equip systems with specific hardware that allows out-of-band management, a solution to access and manage the server when normal remote management fails (i.e. when SSH fails or RDP sessions can't be established).

Solutions differ from KVM (over IP) that connect the systems USB port and graphics cards to IPMI and built-in solutions such as HP's iLO.

In the past I've also had two systems connected with serial cables on used those to get a serial console connection from one to the other.

Typically when SSH fails other software services may also be affected, but you could have alternate management tooling installed, i.e. a VNC server, a web based control panel such as webmin etc.

0

If your remote machine is not a server with IPMI, iLo, etc. maybe you might want to use something like this:

http://www.aten.com/products/productItem.php?model_no=IP8000

It's a machine management card which is pluged into PCI slot.

0

Found a quick fix which will probably help to keep sshd running: monit http://www.cyberciti.biz/faq/monit-sshd-server-configuration/

If the problem still appears, I will try the PHP shell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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