Skip to content

Commit 51ce78a

Browse files
committed
doc: ssh auth refactor
1 parent e0e26dd commit 51ce78a

File tree

1 file changed

+45
-11
lines changed

1 file changed

+45
-11
lines changed

website/docs/Configurations/Profiles/sas9ssh.md

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 4
44

55
# SAS 9.4 (remote - SSH) Connection Profile
66

7-
For a secure connection to SAS 9.4 (remote - SSH) server, a public / private SSH key pair is required. The socket defined in the environment variable `SSH_AUTH_SOCK` is used to communicate with ssh-agent to authenticate the SSH session. The private key must be registered with the ssh-agent. The steps for configuring SSH follow.
7+
This connection method uses SSH to authenticate to a SAS Server and run SAS Code using [Interactive Line Mode](https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/n16ui9f6dacn8pn1t0y2hgxgi7wa.htm). A number of methods are available to create a secure connection to the SAS 9.4 server.
88

99
:::note
1010

@@ -18,18 +18,29 @@ A SAS 9.4 (remote – SSH) connection profile includes the following parameters:
1818

1919
`"connectionType": "ssh"`
2020

21-
| Name | Description | Additional Notes |
22-
| ---------- | ------------------------------------ | -------------------------------------------------------------------------- |
23-
| `host` | SSH Server Host | Appears when hovering over the status bar. |
24-
| `username` | SSH Server Username | The username to establish the SSH connection to the server. |
25-
| `port` | SSH Server Port | The SSH port of the SSH server. The default value is 22. |
26-
| `saspath` | Path to SAS Executable on the server | Must be a fully qualified path on the SSH server to a SAS executable file. |
21+
| Name | Description | Additional Notes |
22+
| -------------------- | ------------------------------------ | ----------------------------------------------------------------------------- |
23+
| `host` | SSH Server Host | Appears when hovering over the status bar. |
24+
| `username` | SSH Server Username | The username to establish the SSH connection to the server. |
25+
| `port` | SSH Server Port | The SSH port of the SSH server. The default value is 22. |
26+
| `saspath` | Path to SAS Executable on the server | Must be a fully qualified path on the SSH server to a SAS executable file. |
27+
| `privateKeyFilePath` | SSH Private Key File (optional) | Must be a fully qualified path on the same machine that VSCode is running on. |
2728

28-
## Required setup for connection to SAS 9.4 (remote - SSH)
29+
## Authenticating to a SAS Server
2930

30-
In order to configure the connection between VS Code and SAS 9, you must configure OpenSSH. Follow the steps below to complete the setup.
31+
The extension will attempt to authenticate to the SAS Server over ssh using the auth methods specified in the SSH Server configuration defined on the SAS Server. The extension currently supports using the SSH auth methods listed below:
3132

32-
### Windows
33+
- [Publickey](#publickey)
34+
- [Password](#password)
35+
- [Keyboard Interactive](#keyboard-interactive)
36+
37+
### Publickey
38+
39+
#### SSH Agent
40+
41+
When using publickey SSH authentication, The extension can be configured to use keys defined in the SSH Agent. The socket defined in the environment variable `SSH_AUTH_SOCK` is used to communicate with ssh-agent to authenticate the SSH session. The private key must be registered with the ssh-agent when using this method. The steps for configuring SSH follow. Follow the steps below to complete the setup.
42+
43+
##### Windows
3344

3445
1. Enable OpenSSH for Windows using these [instructions](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui).
3546

@@ -80,7 +91,7 @@ Note: the default path to the SAS executable (saspath) is /opt/sasinside/SASHome
8091

8192
9. Add the public part of the keypair to the SAS server. Add the contents of the key file to the ~/.ssh/authorized_keys file.
8293

83-
### Mac
94+
##### Mac
8495

8596
1. Start ssh-agent in the background:
8697

@@ -118,3 +129,26 @@ Host host.machine.name
118129
```
119130

120131
6. Add the public part of the keypair to the SAS server. Add the contents of the key file to the ~/.ssh/authorized_keys file.
132+
133+
### Connection Profile
134+
135+
A private key can optionally be specified in the `privateKeyFilePath` field in the connection profile for SAS 9.4 (remote - SSH). This is useful for auth setups where the SSH Agent cannot be used. If a private key file contains a passphrase, the user will be prompted to enter it during each Session creation for which it is used.
136+
137+
```json
138+
"ssh_test": {
139+
"connectionType": "ssh",
140+
"host": "host.machine.name",
141+
"saspath": "/path/to/sas/executable",
142+
"username": "username",
143+
"port": 22,
144+
"privateKeyFilePath": "/path/to/privatekey/file"
145+
}
146+
```
147+
148+
### Password
149+
150+
Enter the password using the secure input prompt during each Session creation. To authenticate without using a password, configure the extension using one of the Publickey setups.
151+
152+
### Keyboard Interactive
153+
154+
Enter the response to each question using the secure input prompts during each Session creation.

0 commit comments

Comments
 (0)