summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hosts/alsvid20010
1 files changed, 7 insertions, 3 deletions
diff --git a/hosts/alsvid200 b/hosts/alsvid200
index 0a83067..298f2f5 100644
--- a/hosts/alsvid200
+++ b/hosts/alsvid200
@@ -208,9 +208,13 @@ do_postinst()
# Generate target's SSH keypair.
rm -f "${target}/home/pj/.ssh/id_rsa" \
"${target}/home/pj/.ssh/id_rsa.pub" || return 1
- in_target ssh-keygen -b 4096 -C pj@alsvid200 -t rsa \
- -f /home/pj/.ssh/id_rsa </dev/null || return 1
- cp "${target}/home/pj/.ssh/id_rsa.pub" 'pj@alsvid200.pub' || return 1
+ install -o pj -g pj -m 0600 '/home/pj/.ssh/id_rsa' \
+ "${target}/home/pj/.ssh/id_rsa" || return 1
+ install -o pj -g pj -m 0600 '/home/pj/.ssh/id_rsa.pub' \
+ "${target}/home/pj/.ssh/id_rsa.pub" || return 1
+ #in_target ssh-keygen -b 4096 -C pj@alsvid200 -t rsa \
+ # -f /home/pj/.ssh/id_rsa </dev/null || return 1
+ #cp "${target}/home/pj/.ssh/id_rsa.pub" 'pj@alsvid200.pub' || return 1
return 0
}