Difference between revisions of "SSH Settings"
(→Connection) |
(→Host Collection) |
||
Line 41: | Line 41: | ||
[[File:Ssh collection hosts.png|Ssh collection hosts.png]] | [[File:Ssh collection hosts.png|Ssh collection hosts.png]] | ||
+ | |||
+ | To add host to collection do the following: | ||
+ | * Copy whole {...} from Host | ||
+ | * Add field '''label''' | ||
+ | * Adjust fields | ||
+ | |||
+ | Result: | ||
=Timeouts= | =Timeouts= |
Revision as of 09:50, 7 August 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 an 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.
To add host to collection do the following:
- Copy whole {...} from Host
- Add field label
- Adjust fields
Result:
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: 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.