SSH Tunnel for SAS/CONNECT: Example

Start-up of a UNIX Spawner on a Single-User SAS/CONNECT Server

Here is an example of code for starting a UNIX spawner program that runs on a server that SAS/CONNECT clients connect to.
cntspawn -service 4321 
The UNIX spawner is started and is listening on destination port 4321. For complete details about starting a UNIX spawner, see Communications Access Methods for SAS/CONNECT and SAS/SHARE.

Connection of a SAS/CONNECT Client to a UNIX Spawner on a SAS/CONNECT Server

After the UNIX spawner has been started on a SAS/CONNECT server, a SAS/CONNECT client can connect to it.
Here is an example of code for setting up an SSH tunnel using OpenSSH and making a client connection to the UNIX spawner that is running on a SAS/CONNECT server:
ssh -N -L
5555:SSH-client-computer:4321
SSH-server-computer 
The SSH command is entered in the command line. The SSH software is started on the computer on which the SSH client runs. The SSH client's listen port is defined as 5555. The SAS/CONNECT client accesses the SSH client's listen port that is tunneled to the UNIX spawner, which runs on destination port 4321.
%let sshhost=SSH-client-computer
5555; 
signon sshhost; 
In SAS, the macro variable SSHHOST is assigned to the SSH client computer and its listen port 5555. A sign-on is specified to a SAS/CONNECT client at listen port 5555. The SSH client forwards the request from port 5555 through an encrypted tunnel to the SSH server, which forwards the request to the UNIX spawner that is listening on destination port 4321.