diff options
author | 2020-06-23 12:55:14 +0200 | |
---|---|---|
committer | 2020-06-23 12:55:14 +0200 | |
commit | 80b864230e9ca7ce586bc279c1c035ecf2627eac (patch) | |
tree | 179d36466047cd162b499ef54f308b7470edc11a | |
parent | 5fba392e061558acced771bc246856f467c13b63 (diff) |
Fix remote shell setup in HOT
'PermitRootLogin' keyword is commented out by default
so sed pattern needed adjustment to actually work.
Nova injected rule that forbids root login was removed
from authorized_keys file.
Change-Id: Ib582848a2499ce4a882c5199069b3c5de57b1b3b
Issue-ID: INT-1634
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rw-r--r-- | deployment/src/simulators_heat_template.yaml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/deployment/src/simulators_heat_template.yaml b/deployment/src/simulators_heat_template.yaml index a8071c5..1b6d4ba 100644 --- a/deployment/src/simulators_heat_template.yaml +++ b/deployment/src/simulators_heat_template.yaml @@ -45,10 +45,13 @@ resources: } enable_root_ssh () { - sed -i 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config + sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config sed -i 's/PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config service sshd restart echo -e "arthur\narthur" | passwd root + # Drop Nova injected hook that for forbids direct root login + AUTHORIZED_KEYS=$(grep -o ssh-rsa.* /root/.ssh/authorized_keys) + echo $AUTHORIZED_KEYS > /root/.ssh/authorized_keys } update_os () { |