xmen
Posts: 3
Joined: Sat Aug 23, 2014 11:00 am

Disable Terminal

Sun Aug 24, 2014 3:20 am

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 ?

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Disable Terminal

Sun Aug 24, 2014 4:10 am

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

xmen
Posts: 3
Joined: Sat Aug 23, 2014 11:00 am

Re: Disable Terminal

Sun Aug 24, 2014 4:42 am

Thank you, exactly what I needed. But what is serial line ? if I disable, login using Ethernet will still work ?

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Disable Terminal

Sun Aug 24, 2014 4:53 am

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).

User avatar
rpdom
Posts: 17174
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Disable Terminal

Sun Aug 24, 2014 5:54 am

Another method that works is to change the word "respawn" to "off", which prevents the line from being actioned.

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: Disable Terminal

Sun Aug 24, 2014 7:43 am

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.

Return to “Beginners”