CLion 2021.1 Help

SSH Configurations

Use this page to set up SSH configurations, which can be used in remote and WSL toolchains, and in Remote GDB Server run/debug configurations.

Toolbar

ItemTooltip and ShortcutDescription
the Add button

Add

Insert

Create a new SSH configuration.
the Remove button

Delete

Alt+Delete

Remove the selected SSH configuration.

the Copy button

Copy

Ctrl+D

Create a copy of the selected SSH configuration.
the Rename button

Rename

Shift+F6

Rename the selected SSH configuration.

SSH configuration settings

ItemDescription
Visible only for this project

Restrict this SSH configuration to the current project. The configuration will not be available in other projects. CLion stores such configurations in the project's .idea directory, which you can share between team members in a VCS.

By default, this option is disabled and CLion stores the SHH configuration in the IDE configuration directory. In this case, you can use this configuration in any project when working from the current instance of CLion.

HostSpecify the hostname of the server to connect to. The default value is localhost.
User nameSpecify the username for authentication to the server.
PortSpecify the remote port number to connect to. The default value is 22 (the standard TCP port for SSH).
Local portSpecify the local port number from which you want to forward the connection. There is no default value, which means CLion dynamically selects the port number.
Authentication type

Select the client authentication method:

  • Password: Authenticate with the specified password and remember it if necessary.

  • Key pair: Use SSH authentication with a key pair (OpenSSH or PuTTY). Specify the location of the private key file and the corresponding authentication passphrase. The public key should be on the remote server. Remember the passphrase if necessary.

  • OpenSSH config and authentication agent: Use a credentials helper application that manages your SSH keys, such as Pageant on Windows or ssh-agent on macOS and Linux.

    For example, see the following tutorial: Generating a new SSH key and adding it to the ssh-agent.

Test ConnectionTry to connect with the current SSH configuration settings.

Connection Parameters

ItemDescription
Send keep alive messages everySend regular packets to keep the SSH connection active. Without regular messages, the remote server might close the connection. Set the message period in seconds.
Strict host key checking

Specify how to handle new and changed host keys.

  • Yes: Never add new host keys to the user's known_hosts file and never allow connections to hosts with changed host keys.

  • Accept New: Always add new host keys to the user's known_hosts file but never allow connections to hosts with changed host keys.

  • No: Always add new host keys to the user's known_hosts file and allow connections to hosts with changed host keys.

  • Ask: Add new host keys to the user's known_hosts file only after confirmation and never allow connections to hosts with changed host keys. This is the default behavior.

Hash hosts in known_hosts fileStore new host records in hash format.
Last modified: 08 March 2021