Skip to content

Commit e64ec2b

Browse files
author
Patrick M
committed
feat: add post
1 parent 21e15c6 commit e64ec2b

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ description: >- # used by seo meta and the atom feed
2727
A tutorial and notes driven blog for coding, development, and projects
2828
2929
# fill in the protocol & hostname for your site, e.g., 'https://username.github.io'
30-
url: 'https://patrickmoore.dev'
30+
url: 'https://binarypatrick.dev'
3131

3232
github:
3333
username: binarypatrick # change to your github username

_posts/.placeholder

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: post
3+
title: "Show IP on TTY Login Prompt"
4+
date: 2023-06-16 00:00:00 -0500
5+
category: "Service Setup"
6+
tags: ['linux', 'debian', 'headless']
7+
---
8+
9+
When I first log into a linux instance I've set up, I often look to find the ethernet adapter details. To make this easier, I like to add the IP address to the TTY login screen. This is a nice thing to do for future me troubleshooting a networking problem.
10+
11+
## Considerations
12+
13+
Firstly, if security is your only concern, don't do this. It will make it easier for someone with physical access to know details about this machine without doing any work to get them. In my opinion, physical access is access and therefore if someone can see the TTY login, I likely have more to worry about. Secondly, this unfortunately requires at least one login to set up. So if you're looking to SSH without ever logging in, you'll still need to figure out the IP at least initally.
14+
15+
Something else to note is sometimes it take a second for the system to establish an IP if it's using DHCP. This can mean a blank field initally that is populated when the IP is finally set.
16+
17+
## Changes
18+
19+
First get the adapter you want to add to the TTY login page
20+
21+
```bash
22+
ip addr
23+
```
24+
25+
Pick an address that isn't the loopback address. Then you can edit `/etc/issue` with the adapter name.
26+
27+
```bash
28+
sudo nano /etc/issue
29+
```
30+
31+
In this example, the adapter I want to show is `eth0`. You will need to replace this with your the adapter name.
32+
33+
```text
34+
Debian GNU/Linux 11 \n \l
35+
eth0: \4{eth0}
36+
```
37+
38+
> Using DHCP it take a second for the system to establish an IP and you may see a blank value for the first few seconds after startup
39+
{: .prompt-warning }

0 commit comments

Comments
 (0)