-1

I've encountered a weird problem imo, and none of my co-workers have no idea why this keeps happening.

First of, I've built a little server machine for beta testing of my upcoming software & website. I installed Ubuntu Server 13.10 on the machine and openssh-server on it. The machine has only ethernet cable plugged in, no monitors or keyboards. My router uses a dhcp server but I have setuped a static ip for Server. I can remotely access it from public easily. I forwarded ssh port from my router. I did some changes to my website files and then I decided for some odd reason to reboot the server. After rebooting it, I cannot access it from public anymore. The server is currently at home and I'm away. But I managed to get physically to the server today. I plugged in a monitor to inspect in which state the server is. The server was on logon state. I checked is router working fine by connecting into wlan with my phone, and went to whatsmyipaddress.com. IP hadn't changed and connection was working. I didn't have keyboard nor my laptop with me to inspect it further. I assumed it was working because it had rebooted and internet connection was fine. When I finally made it to my laptop and tried to connect with putty it said "Network error: Connection refused". My lucky guess is that after every reboot I need to login physically on the server before ssh connections will work.

I googled and found about of autologin. Wouldn't that then be a security issue? I mean you could just make a ssh connection from every single machine with internet connection if you just happen to know the IP address, and then you could just mess everything up, am I right?

I need some suggestions what to do for this. I get to the server machine again tomorrow morning with laptop and keyboard this time so I can inspect it further. I hope you guys make up some suggestions what I should do about it. I must be able to reboot the server remotely, and then get back on it after reboot.

The best regards, Roope

Rob
  • 9

1 Answers1

1

Okay. First of I want to thank all who tried to help me. I post everything what I did here.

"I managed physically to get to the server this morning and noticed that it's still in the same state as yesterday. BUT! I read the log above and noticed it had just logout my user, and got stuck into root (aka single-user mode). Therefore ssh connection was not available. I used 'sudo reboot now' command for rebooting. It said it failed restarting at some point but unfortunately I don't remember which point it was. Although I have ssh connection now working fine. I restarted the machine then correctly and when it had fully rebooted and asked for my user's credentials, I was able to connect via ssh from public, without logging in physically.

TL;DR - The rebooting of server failed, and only logged my user out. Then server was on root mode (aka single-user mode) and had never actually rebooted. Although, when I pressed the power button and it rebooted, I was able to create a ssh session."

Now, I got again physically to the server and tried to reboot it via ssh first. I noticed it fails when it tries to kill all remaining processes. I said this to my friend and he suggested me to do only "sudo reboot", without the now-attribute. Well, this command rebooted server successfully and I was able to make ssh connection when it had rebooted. My friend was thinking that the now-attribute is not a real attribute for reboot command but he was wondering why it's not shown as invalid attribute then. Anyhow, a normal "sudo reboot" rebooted the server just fine. I'd like once again thank you all for helping me out. Cheers!

Rob
  • 9