Author Topic: Logging on to Ubuntu Server with only a keyboard?  (Read 1860 times)

0 Members and 1 Guest are viewing this topic.

Offline DeltaTopic starter

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Logging on to Ubuntu Server with only a keyboard?
« on: August 10, 2017, 07:14:07 am »
So, me being the genius that I am, have done the geek equivalent of locking my house and then posting the keys through the letterbox.

I'm away with work, and whilst messing around over SSH with my RasPi at home, I enabled ufw without allowing SSH. :palm:

I don't think I can persuade my Better Half to lug a monitor up to the loft, but I'm sure she would humour me and take a USB keyboard up.  I am assuming that executing
Code: [Select]
sudo ufw disable
would do the trick...

Question is, how will Ubuntu Server 16.04 be sitting?  Will it be sat waiting for a username, or do you need to press enter to get to the login prompt?  Have I got any chance of getting back into my system using only a phone, a keyboard, and a long-suffering wife?
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23099
  • Country: gb
Re: Logging on to Ubuntu Server with only a keyboard?
« Reply #1 on: August 10, 2017, 07:28:32 am »
It'll probably have a blank screen. Just hit any key and it will show the banner and "login:". Enter username, password, then sudo ufw disable and you'll be done.

I've done this before. It cost me a drive from London to Manchester :D

Edit: ufw default rules usually allow ssh. May be something else!
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 615
  • Country: ca
Re: Logging on to Ubuntu Server with only a keyboard?
« Reply #2 on: August 10, 2017, 11:51:32 am »
I seem to remember that even if the screen blanking is on, the first keypress will be sent as input to whatever is waiting on the terminal.

It has been my experience with this sorta thing that unless the person being the "hands" on the other side of the phone line is highly motivated to make whatever you are trying to do work, it will likely fail in subtle way(s). But it shouldn't hurt to try :)  GL!
 

Offline DeltaTopic starter

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: Logging on to Ubuntu Server with only a keyboard?
« Reply #3 on: August 10, 2017, 08:48:45 pm »
Well it failed.  She lugged a monitor up in the end.

When she plugged the (HDMI) monitor in, there was no signal, even after bashing keys.  Gave up and got her to reset it in the end, then log in with the benefit of seeing what the computer is actually bloody doing!

This is going to be a costly mistake, perfume, jewellery or a nice top probably!
 

Offline cjs

  • Contributor
  • Posts: 49
  • Country: jp
  • Software geek
Re: Logging on to Ubuntu Server with only a keyboard?
« Reply #4 on: October 14, 2017, 12:01:29 am »
One of the things you always want for a remote machine is, if not the ideal of LOM (Lights Out Management, see below) is a serial console or at least serial terminal.

Pins 8 and 10 on the GPIO header are the TX/RX pins for a 3.3 V TTL serial interface. The usual way of connecting it is to use cable with a 3.3 V serial to USB converter built in and plug the USB end into a nearby computer. The Adafruit Using a Console Cable guide gives details of how to get up and running. Note that this actually sets the boot console to the serial port, so you'll see all your kernel and startup output there instead of on the monitor when you boot the system. If you simply want to have the serial port as an extra terminal while still having the keyboard/video as your system console, you can do that by enabling the "getty" service on it. This blog post includes information on that, along with some notes on the changes to serial configuration with the Raspberry Pi 3.

If your computer is more than a couple of meters away from your Pi you'll need to run the serial link further, which you may be able to do at low bit rates (say, 9600 bps) simply by running three longer wires (TX, RX ground) from the Pi to the USB converter. At longer distances even this will be too error-prone, however, so you'll want to hack together a converter the Raspberry Pi end to convert the 3.3 V TTL serial to something like RS-422 and a converter at the other end to bring it back to TTL for a USB serial interface. This can give you a range of a kilometer or more over four wires, which is likely to reach even from the deepest basement to the furthest attic.

Full Lights Out Management is a common thing on rack-mount PC servers: it adds a second (small) computer on to the motherboard that usually shares an Ethernet port with the main system but can be contacted independently and is powered up even when the main computer is down. It lets you power on and off the main computer, see the boot screens, configure the BIOS, and so on, all via a network connection, and it's not uncommon for the only actual server access to be installing it into a rack and plugging in the power and Ethernet with the OS install and everything else from that point on being done remotely.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf