mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos/ec2: Fix typo, chown -> chmod
This commit is contained in:
parent
05acf33131
commit
11d9033d85
2 changed files with 3 additions and 3 deletions
|
@ -34,7 +34,7 @@ with lib;
|
|||
if ! [ -e /root/.ssh/authorized_keys ]; then
|
||||
echo "obtaining SSH key..."
|
||||
mkdir -p /root/.ssh
|
||||
chown 0700 /root/.ssh
|
||||
chmod 0700 /root/.ssh
|
||||
if [ -s /etc/ec2-metadata/public-keys-0-openssh-key ]; then
|
||||
(umask 177; cat /etc/ec2-metadata/public-keys-0-openssh-key >> /root/.ssh/authorized_keys)
|
||||
echo "new key added to authorized_keys"
|
||||
|
@ -47,7 +47,7 @@ with lib;
|
|||
userData=/etc/ec2-metadata/user-data
|
||||
|
||||
mkdir -p /etc/ssh
|
||||
chown 0755 /etc/ssh
|
||||
chmod 0755 /etc/ssh
|
||||
|
||||
if [ -s "$userData" ]; then
|
||||
key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' $userData)"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
metaDir=/etc/ec2-metadata
|
||||
mkdir -p "$metaDir"
|
||||
chown 0755 "$metaDir"
|
||||
chmod 0755 "$metaDir"
|
||||
rm -f "$metaDir/*"
|
||||
|
||||
get_imds_token() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue