You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/03/27 15:50:33 UTC
[impala] 04/06: IMPALA-8314 Set correct permissions for ~/.ssh files
This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit fbe6cb4e0189e1e7f00c5a1a501002e676e216ce
Author: Hector Acosta <he...@cloudera.com>
AuthorDate: Mon Mar 11 10:34:15 2019 -0700
IMPALA-8314 Set correct permissions for ~/.ssh files
Without this running bootstrap_system.sh resulted in:
++ chmod go-rwx /home/hacosta/.ssh
++ [[ -f /home/hacosta/.ssh/id_rsa ]]
++ ssh-keygen -t rsa -N '' -q -f /home/hacosta/.ssh/id_rsa
++ cat /home/hacosta/.ssh/id_rsa.pub
++ echo 'NoHostAuthenticationForLocalhost yes'
++ ssh localhost whoami
Bad owner or permissions on /home/hacosta/.ssh/config
Change-Id: I3dd6b12318dd99c67127bff10a89adb931f44087
Reviewed-on: http://gerrit.cloudera.org:8080/12725
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
bin/bootstrap_system.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/bootstrap_system.sh b/bin/bootstrap_system.sh
index 574dd5d..cd7a891 100755
--- a/bin/bootstrap_system.sh
+++ b/bin/bootstrap_system.sh
@@ -299,8 +299,8 @@ if ! [[ -f ~/.ssh/id_rsa ]]
then
ssh-keygen -t rsa -N '' -q -f ~/.ssh/id_rsa
fi
-cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
-echo "NoHostAuthenticationForLocalhost yes" >> ~/.ssh/config
+cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys
+echo "NoHostAuthenticationForLocalhost yes" >> ~/.ssh/config && chmod 0600 ~/.ssh/config
ssh localhost whoami
# Workarounds for HDFS networking issues: On the minicluster, tests that rely