From c4aa6d71d9429bea59b5b7aadac3dd12d710acc2 Mon Sep 17 00:00:00 2001 From: Tommi Pekkala Date: Thu, 10 Oct 2019 12:03:59 +0300 Subject: [PATCH] Fix publickey deployment issue Qtcreator was unable to create .ssh dir so this will fix it. Task-number: QTCREATORBUG-22591 Change-Id: I11d6f8e0ccc88ff3bff956edb1912e59ab70092d Reviewed-by: Christian Kandeler --- src/plugins/remotelinux/sshkeydeployer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/remotelinux/sshkeydeployer.cpp b/src/plugins/remotelinux/sshkeydeployer.cpp index 2c73ffeff1b..ff6b0d3bf0e 100644 --- a/src/plugins/remotelinux/sshkeydeployer.cpp +++ b/src/plugins/remotelinux/sshkeydeployer.cpp @@ -68,7 +68,7 @@ void SshKeyDeployer::deployPublicKey(const SshConnectionParameters &sshParams, connect(&d->deployProcess, &SshRemoteProcessRunner::processClosed, this, &SshKeyDeployer::handleKeyUploadFinished); const QString command = "test -d .ssh " - "|| mkdir .ssh && chmod 0700 .ssh && echo '" + "|| mkdir -p ~/.ssh && chmod 0700 .ssh && echo '" + QString::fromLocal8Bit(reader.data()) + "' >> .ssh/authorized_keys && chmod 0600 .ssh/authorized_keys"; d->deployProcess.run(command, sshParams);