aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2016-08-29 13:59:09 +0800
committerzhihui wu <wu.zhihui1@zte.com.cn>2016-08-29 06:22:44 +0000
commitd243569ea2afc5a872a92860ff99a801cebe2c21 (patch)
tree3e678b8fc3748a83db3df6ad2920d4cf2a273597
parent3950a609b6332f0a25f5d8298ad6571809912f76 (diff)
Add ssh option "UserKnownHostsFile=/dev/null"
To prevent the OpenSSH warning about permission denied, add ssh option "UserKnownHostsFile=/dev/null" Change-Id: I0b0d765bc2d14c666d5367c655ced0ea31cc7f87 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
-rwxr-xr-xdata/qtip_creds.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/qtip_creds.sh b/data/qtip_creds.sh
index 6f19305a..beb4659f 100755
--- a/data/qtip_creds.sh
+++ b/data/qtip_creds.sh
@@ -3,7 +3,7 @@
DEST_IP=$1
echo $INSTALLER_TYPE
echo $INSTALLER_IP
-sshoptions="-o StrictHostKeyChecking=no"
+sshoptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
case "$INSTALLER_TYPE" in
apex)
scp $sshoptions -i $APEX_KEY ./data/QtipKey.pub stack@$INSTALLER_IP:/home/stack
@@ -14,7 +14,7 @@ case "$INSTALLER_TYPE" in
PSWD="r00tme"
sshpass -p $PSWD scp $sshoptions ./data/QtipKey.pub root@$INSTALLER_IP:/root
sshpass -p $PSWD scp $sshoptions ./data/QtipKey root@$INSTALLER_IP:/root
- sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "grep -q '\-F /dev/null ' /usr/bin/ssh-copy-id || sed -i 's/\(ssh -i.*$\)/\1\n -F \/dev\/null \\\/g' `which ssh-copy-id`"
+ sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "grep -q '\-F /dev/null ' /usr/bin/ssh-copy-id || sed -i 's/\(ssh -i.*$\)/\1\n -F \/dev\/null \\\/g' `which ssh-copy-id`"
sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id $sshoptions -i /root/QtipKey root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
;;
compass)