Page 1 of 1

Disable Terminal

Posted: Sun Aug 24, 2014 3:20 am
by xmen
I have Rasbian installed on raspberry pi and what I want is that I can only access it through network. Not by local keyboard or anything else. Possible ?

Re: Disable Terminal

Posted: Sun Aug 24, 2014 4:10 am
by AndyD
xmen wrote:I have Rasbian installed on raspberry pi and what I want is that I can only access it through network. Not by local keyboard or anything else. Possible ?
It is possible and not very complicated. However probably not necessary if you have a reasonably good password. If you really want to do it though ...

Edit /etc/inittab and comment out the following lines by putting a hash (#) character in front of them.

Code: Select all

1:2345:respawn:/sbin/getty --noclear 38400 tty1 
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
You can disable logging in from the serial port as well if you want by commenting out

Code: Select all

T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Re: Disable Terminal

Posted: Sun Aug 24, 2014 4:42 am
by xmen
Thank you, exactly what I needed. But what is serial line ? if I disable, login using Ethernet will still work ?

Re: Disable Terminal

Posted: Sun Aug 24, 2014 4:53 am
by AndyD
xmen wrote:Thank you, exactly what I needed. But what is serial line ? if I disable, login using Ethernet will still work ?
The Raspberry Pi GPIO provides (among other things) provides a serial connection into the Raspberry Pi. In Raspbian this is set up to enable you to log in via a serial terminal connected to the GPIO.

This does not have anything to do with logging in via the Ethernet (using SSH).

Re: Disable Terminal

Posted: Sun Aug 24, 2014 5:54 am
by rpdom
Another method that works is to change the word "respawn" to "off", which prevents the line from being actioned.

Re: Disable Terminal

Posted: Sun Aug 24, 2014 7:43 am
by sprinkmeier
xmen wrote:I have Rasbian installed on raspberry pi and what I want is that I can only access it through network. Not by local keyboard or anything else. Possible ?
Just unplug the keyboard.

If the 'bad guy' has no physical access to plug one in then that's enough.
If the 'bad guy' has physical access then there's nothing you can do.

Disabling the console terminal doesn't help much if the bad-guy can pull the SD card and image/edit it.