Difference between revisions of "SSH Settings"

From VSI OpenVMS Wiki
Jump to: navigation, search
(SSH Settings Template)
(Connection)
Line 33: Line 33:
 
* <code>'''Username'''</code> - User account that will be used for the SSH connection.
 
* <code>'''Username'''</code> - User account that will be used for the SSH connection.
 
* <code>'''Password'''</code> - User password that will be used for the SSH connection.. If it is omitted a password input box will be shown on connection attempt.
 
* <code>'''Password'''</code> - User password that will be used for the SSH connection.. If it is omitted a password input box will be shown on connection attempt.
* <code>'''Key File'''</code> - Path to SSH private key file.  
+
* <code>'''Key File'''</code> - Path to SSH private key file.
 +
* <code>'''skipSignatureVerification'''</code> - Skip signature verification. Set it to 'true' if error 'Handshake failed: signature verification failed' occurs.
  
 
=Host Collection=
 
=Host Collection=

Revision as of 10:56, 17 July 2019

An SSH connection to an OpenVMS machine is required for syncing source code files, building, running and debugging projects. Depending on the type of configuration, SSH connection settings can be edited either in the vmssoftware.ssh-helper-settings.json file located in /.vscode directory or via Visual Studio Code settings page.

SSH Settings Template

{
    "connection": {
        "host": "",
        "keyFile": "",
        "password": "",
        "port": 22,
        "username": "",
        "skipSignatureVerification": false,
    },
    "host-collection": {
        "hosts": []
    },
    "timeouts": {
        "cmdTimeout": 0,
        "feedbackTimeout": 0,
        "welcomeTimeout": 0
    },
    "terminal": {
        "command": "ssh -oHostKeyAlgorithms=+ssh-dss ${keyFile?-i ${keyFile}} ${username?${username}@}${host}"
    }
}

Connection

The connection section sets the current connection details.

  • Host - IP-address or name of OpenVMS machine. It also can refer to the label of a connection specified in host-collection section - should be enclosed in angle brackets (<hostname>). In that

case, all other fields are ignored.

  • Port - The port number to use for the SSH connection. Default is 22.
  • Username - User account that will be used for the SSH connection.
  • Password - User password that will be used for the SSH connection.. If it is omitted a password input box will be shown on connection attempt.
  • Key File - Path to SSH private key file.
  • skipSignatureVerification - Skip signature verification. Set it to 'true' if error 'Handshake failed: signature verification failed' occurs.

Host Collection

If you need to connect to different servers when working on your project, it makes sense to list all the required connections and then just pick the one that you need by using its label as the host name in the connection section.

NOTE: If you use VSC type of configuration, you will not be able to specify host collection in UI. Instead, you need to click "Edit in settings.json" and specify them in the settings.json file. 

Ssh collection hosts.png

Timeouts

Specifies SSH connection timesouts.

  • Cmd Timeout - Timeout for command response. If a command is sent to the OpenVMS system and the OpenVMS system does not a send response for the specified period of time, it will be considered as rejected.
  • Feedback Timeout - If the SSH connection does not send feedback for this period, the specified password will be considered as invalid.
  • Welcome Timeout - If the SSH shell prompt is not received within this period of time, the shell will be closed.
NOTE: Value "0" means, that timeout is not used. 
WARN: Do not change timeout settings unless necessary.

Terminal

New in version 0.0.22 Specifies command to start SSH terminal.

  • Command - command to start SSH terminal. It is possible to insert variables into command. The syntax is: ${variable} or ${varable?<text if variable isn't empty>}. Where variable can be following (from the current connection settings): host, port, username, password and keyFile.
NOTE: password may come from settings or if user entered it in UI prompt. Passwords entered in SSH terminal aren't saved.