2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
2017-02-10 15:17:34 +01:00
|
|
|
|
|
|
|
|
/*!
|
2019-01-03 13:09:04 +01:00
|
|
|
|
|
|
|
|
//! [configuring ssh]
|
|
|
|
|
\section2 Configuring SSH Connections
|
|
|
|
|
|
|
|
|
|
SSH connections are established via an OpenSSH client running in master
|
|
|
|
|
mode, if possible. Connection sharing is enabled by default to allow
|
|
|
|
|
sharing multiple sessions over a single SSH connection. This way, a
|
|
|
|
|
connection is only established once and then re-used by subsequent run
|
|
|
|
|
and deploy procedures, saving connection setup overhead particularly
|
|
|
|
|
with embedded devices. Because connection sharing is not supported on
|
|
|
|
|
Windows, a new SSH connection is created for each deploy or run procedure.
|
|
|
|
|
|
|
|
|
|
To create SSH connections, you must install the \l{https://www.openssh.com/}
|
|
|
|
|
{OpenSSH} suite, which includes the ssh, sftp, and ssh-keygen tools on the
|
|
|
|
|
development PC.
|
|
|
|
|
|
|
|
|
|
To tell \QC where it can find the tools, specify the paths to the
|
2023-10-17 16:19:40 +02:00
|
|
|
directories where the tools are installed in \preferences >
|
|
|
|
|
\uicontrol Devices > \uicontrol SSH:
|
2019-01-03 13:09:04 +01:00
|
|
|
|
2022-07-11 16:54:45 +02:00
|
|
|
\image qtcreator-ssh-options.png "SSH preferences"
|
2019-01-03 13:09:04 +01:00
|
|
|
|
|
|
|
|
\list
|
|
|
|
|
\li Deselect the \uicontrol {Enable connection sharing} check box to
|
|
|
|
|
create a new SSH connection for each deploy and run procedure. This
|
|
|
|
|
option is grayed on Windows, where connection sharing is not
|
|
|
|
|
supported.
|
|
|
|
|
\li In the \uicontrol {Connection sharing timeout} field, specify the
|
|
|
|
|
timeout for reusing the SSH connection in minutes.
|
|
|
|
|
\li In the \uicontrol {Path to ssh executable} field, enter the path
|
|
|
|
|
to the directory where the OpenSSH executable is installed.
|
|
|
|
|
\li In the \uicontrol {Path to sftp executable} field, enter the path
|
|
|
|
|
to the directory where the SFTP executable is installed.
|
|
|
|
|
\li In the \uicontrol {Path to ssh-askpass executable} field, enter the
|
|
|
|
|
path to the directory where the ssh-askpass executable is installed.
|
|
|
|
|
Usually, you can use the default path that points to the
|
|
|
|
|
implementation of the tool delivered with \QC, qtc-askpass.
|
|
|
|
|
\li In the \uicontrol {Path to ssh-keygen executable} field, enter the
|
|
|
|
|
path to the directory where the ssh-keygen executable is installed.
|
|
|
|
|
\endlist
|
|
|
|
|
|
|
|
|
|
//! [configuring ssh]
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 15:17:34 +01:00
|
|
|
//! [generating ssh keys]
|
|
|
|
|
|
2011-09-14 16:36:18 +02:00
|
|
|
\section2 Generating SSH Keys
|
|
|
|
|
|
|
|
|
|
If you do not have an SSH public and private key pair, you can generate it
|
2012-04-16 11:16:10 +02:00
|
|
|
in \QC. The connection wizard can create the key pair for you, or you can
|
|
|
|
|
create it separately.
|
|
|
|
|
|
2018-11-20 16:44:42 +01:00
|
|
|
You can specify key length and the key algorithm, RSA or ECDSA.
|
2011-09-14 16:36:18 +02:00
|
|
|
If you only use the keys to protect connections to the emulator or
|
|
|
|
|
device, you can use the default values.
|
|
|
|
|
|
|
|
|
|
\list 1
|
|
|
|
|
|
2023-10-17 16:19:40 +02:00
|
|
|
\li Select \preferences > \uicontrol Devices
|
2019-01-03 13:09:04 +01:00
|
|
|
> \uicontrol Devices > \uicontrol {Create New}.
|
2011-09-14 16:36:18 +02:00
|
|
|
|
|
|
|
|
\image qtcreator-ssh-key-configuration.png "SSH Key Configuration dialog"
|
|
|
|
|
|
2014-12-11 15:43:19 +01:00
|
|
|
\li In the \uicontrol {Private key file} field, select the location to save
|
2012-03-13 14:54:18 +01:00
|
|
|
the private key.
|
2011-09-14 16:36:18 +02:00
|
|
|
|
2014-12-11 15:43:19 +01:00
|
|
|
The \uicontrol {Public key file} field displays the location to save the
|
2012-03-13 14:54:18 +01:00
|
|
|
corresponding public key.
|
2011-09-14 16:36:18 +02:00
|
|
|
|
2014-12-11 15:43:19 +01:00
|
|
|
\li Select \uicontrol {Generate And Save Key Pair} to generate and save the
|
2012-03-13 14:54:18 +01:00
|
|
|
keys at the specified locations.
|
2011-09-14 16:36:18 +02:00
|
|
|
|
|
|
|
|
\endlist
|
2017-02-10 15:17:34 +01:00
|
|
|
|
|
|
|
|
//! [generating ssh keys]
|
|
|
|
|
*/
|