mirror of
https://github.com/krislamo/preseed
synced 2024-12-16 08:00:35 +00:00
Update /etc/issue with IP and SSH fingerprint
This commit is contained in:
parent
5a509009b9
commit
d7ab3013b9
10
vmseed.txt
10
vmseed.txt
@ -140,6 +140,14 @@ d-i finish-install/reboot_in_progress note
|
||||
|
||||
# Just before install finishes, install SSH keys into root
|
||||
d-i preseed/late_command string \
|
||||
|
||||
# Install SSH keys
|
||||
mkdir -p /target/root/.ssh; \
|
||||
wget -O /target/root/.ssh/authorized_keys \
|
||||
https://raw.githubusercontent.com/krislamo/bootstrap/master/authorized_keys;
|
||||
https://raw.githubusercontent.com/krislamo/bootstrap/master/authorized_keys; \
|
||||
|
||||
# Update /etc/issue with IP and SSH fingerprint
|
||||
ethdev=$(ip a | grep -e "^2" | awk '{print substr($2, 1, length($2)-1)}'); \
|
||||
echo "$ethdev: \4{$ethdev}" >> /etc/issue; \
|
||||
ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key.pub | \
|
||||
awk '{split($2, a, ":"); print a[2]}' >> /etc/issue; \
|
||||
|
Loading…
Reference in New Issue
Block a user