summaryrefslogtreecommitdiffstats
path: root/hosts
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-03-06 15:15:02 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-03-06 15:17:09 (EST)
commit1591cbdb2959397ee7085570a446b0864bc08454 (patch)
tree966200ea77c1c8c5fde62100d63dc4533c93b9cc /hosts
parent9db26f5ccab37fb7dd61566368b3a3135fdd74d5 (diff)
downloadpc-inst-1591cbdb2959397ee7085570a446b0864bc08454.zip
pc-inst-1591cbdb2959397ee7085570a446b0864bc08454.tar.gz
pc-inst-1591cbdb2959397ee7085570a446b0864bc08454.tar.bz2
Generate SSH keypair
Diffstat (limited to 'hosts')
-rw-r--r--hosts/alsvid2005
1 files changed, 5 insertions, 0 deletions
diff --git a/hosts/alsvid200 b/hosts/alsvid200
index 44b4891..8a366df 100644
--- a/hosts/alsvid200
+++ b/hosts/alsvid200
@@ -100,5 +100,10 @@ do_postinst()
in_target adduser pj wireshark
in_target adduser pj sbuild
+ install -d -o pj -g pj -m 0700 "${target}/home/pj/.ssh"
+ in_target ssh-keygen -b 4096 -C pj@alsvid200 -t rsa \
+ -f /home/pj/.ssh/id_rsa </dev/null
+ cp "${target}/home/pj/.ssh/id_rsa.pub" 'pj@alsvid200.pub'
+
return 0
}